Skip to content

Commit

Permalink
feat: use GHA to deploy pages
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Yu <jack.yu@suse.com>
  • Loading branch information
Yu-Jack committed Dec 19, 2024
1 parent 389f474 commit 68b7b6c
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 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,18 @@ 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
contents: write
pages: write
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

0 comments on commit 68b7b6c

Please sign in to comment.