Skip to content

Commit

Permalink
refactor: update github pages deployment workflow
Browse files Browse the repository at this point in the history
Added a step to download production ready build files

Updated the deployment action to use 'peaceiris/actions-gh-pages@v3'.
  • Loading branch information
zedjarvis committed Sep 4, 2023
1 parent d02676b commit 41daf6d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ jobs:
run: |
pnpm docs:build
touch docs/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: docs/.vitepress/dist
if-no-files-found: error

# Deployment job
deploy:
Expand All @@ -62,6 +64,15 @@ jobs:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: docs/.vitepress/dist

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-latest)

Newline required at end of file but not found

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / lint

Newline required at end of file but not found

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / test (16.x, ubuntu-latest)

Newline required at end of file but not found

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / test (16.x, macos-latest)

Newline required at end of file but not found

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / test (18.x, macos-latest)

Newline required at end of file but not found

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / test (16.x, windows-latest)

Newline required at end of file but not found

Check failure on line 78 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

Newline required at end of file but not found

0 comments on commit 41daf6d

Please sign in to comment.