fix pem issue #1296
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Astro site to GitHub Pages | |
| on: | |
| push: | |
| branches: [ astro-pure-v4_0_3 ] | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: [build, deploy] | |
| branches: [astro-pure-v4_0_3] | |
| discussion: | |
| types: [created, edited, deleted] | |
| discussion_comment: | |
| types: [created, edited, deleted] | |
| concurrency: | |
| group: "pages-deploy" # 全局统一组名,避免频繁评论频繁触发, 确保同一时间只有一个部署任务运行 | |
| cancel-in-progress: true # 新触发时取消旧任务 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.gh_action_token_PAT }} | |
| fetch-depth: 0 | |
| # submodules: 'recursive' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| # - name: Fetch submodules | |
| # continue-on-error: true | |
| # | |
| # run: | | |
| # git submodule update --init --recursive --checkout -f --remote -- "content" | |
| # git config --global user.name "GitHub Action" | |
| # git config --global user.email "noreply@github.com" | |
| # git commit -am "chore(update): fetch submodule" || echo "No changes to commit" | |
| # git push || echo "Nothing to push" | |
| build: | |
| needs: setup | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.gh_action_token_PAT }} | |
| fetch-depth: 0 | |
| submodules: 'recursive' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install Dependencies | |
| run: bun install | |
| - name: Fetch Giscus comments | |
| run: node src/scripts/fetch-comments.js | |
| env: | |
| GITHUB_TOKEN_READ: ${{ secrets.gh_action_token_PAT }} | |
| - name: Build Production | |
| run: bun run build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |