ci: add a github workflow for gh-pages

This commit is contained in:
kunish 2023-08-27 16:33:22 +08:00
parent 9e4a92835a
commit cd96f66da7
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

32
.github/workflows/publish-gh-pages.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Publish Github Pages
on:
push:
branches:
- main
jobs:
publish-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
cache: pnpm
node-version: latest
- name: build
run: |
pnpm install
pnpm build
- name: Publish Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist