From cd96f66da7cf2ae015573fa64e49a9e5ff23bcd3 Mon Sep 17 00:00:00 2001 From: kunish Date: Sun, 27 Aug 2023 16:33:22 +0800 Subject: [PATCH] ci: add a github workflow for gh-pages --- .github/workflows/publish-gh-pages.yml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish-gh-pages.yml diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml new file mode 100644 index 0000000..5daa40c --- /dev/null +++ b/.github/workflows/publish-gh-pages.yml @@ -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