Skip to content

Commit

Permalink
use actions/deploy-pages to deploy to GitHub Pages (#254)
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Oct 6, 2023
1 parent 402bf5a commit 8f9da7e
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@ jobs:
- run: yarn install
- run: yarn build
- run: ln -s index.html dist/404.html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
BASE_BRANCH: master
CLEAN: true
path: dist
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 8f9da7e

Please sign in to comment.