Skip to content

Commit

Permalink
feat: use GHA to deploy pages (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu-Jack authored Dec 19, 2024
1 parent 389f474 commit 6cc95a7
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
branches: [main]

jobs:
deploy:
name: Deploy to GitHub Pages
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,11 +17,21 @@ jobs:
run: |
yarn install --frozen-lockfile
yarn build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
path: ./build
release:
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 6cc95a7

Please sign in to comment.