From 8a50e8a3d6db8d37f6aa66083383da0ffcd9cf81 Mon Sep 17 00:00:00 2001 From: jiaziling Date: Sat, 14 Sep 2024 17:06:53 +0800 Subject: [PATCH] chore: setting git pages deploy --- .github/workflows/deploy.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..eb0cd4d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,37 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [dev-jzl] + workflow_dispatch: + +# 允许 job 克隆 repo 并创建一个 page deployment +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout your repository using git + uses: actions/checkout@v4 + - name: Install dependencies + run: npm install + - name: Build your project + run: npm run docs:build + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs-dist