chore: 使用 giscus 评论系统 #300
This file contains 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 | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "docs/**" | |
- ".github/workflows/deploy.yml" | |
- "pnpm-lock.yaml" | |
concurrency: | |
group: "blog" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: https://mark9804.github.io/blog/ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@main | |
with: | |
node-version: "20" | |
- uses: pnpm/action-setup@master | |
with: | |
version: latest | |
run_install: | | |
- recursive: true | |
- name: Build | |
run: pnpm run build | |
- name: Setup Pages | |
uses: actions/configure-pages@main | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@main | |
with: | |
path: ./docs/.vitepress/dist | |
retention-days: 1 | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@main |