Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/build-and-preview-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,46 @@ jobs:
site-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 1

- name: Install and Build 🔧
- name: Install and Build
run: |
npm install --legacy-peer-deps
node -v
npm run version
npm run noIndex

- name: Broken Link Check 🔗
- name: Broken Link Check
uses: technote-space/broken-link-checker-action@v2
with:
target: ./public/**/*.html
target: ./public/**/*.html

- name: Zip Site
run: bash ./script.sh

- name: Verify public zip
run: |
echo "Workspace files:"
ls -la
echo "Check public-dir.zip exists:"
if [ -f ./public-dir.zip ]; then
echo "Found public-dir.zip"
else
echo "ERROR: public-dir.zip not found"
ls -la public*
exit 1
fi

- name: Upload files
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: public-dir
path: ./public-dir.zip
retention-days: 1

- name: Trigger Inner workflow
run: echo "triggering inner workflow"
2 changes: 1 addition & 1 deletion .github/workflows/preview-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
workflow: build-and-preview-site.yml
workflow: 'Build and Preview Site'
run_id: ${{ github.event.workflow_run.id }}
name: public-dir

Expand Down
Loading