部署到Vercel: 按照[MkDocs + Vercel](https://mkdocs.celsiusnarhwal.dev/)中的方… #1
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 Documentation | |
on: | |
push: | |
paths: | |
- docs/** | |
- snippets/** | |
- overrides/** | |
- mkdocs.yml | |
- requirements.txt | |
- .github/workflows/deploy2vercel.yml | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy Materials to Vercel | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set Up Python | |
uses: actions/setup-python@v5 | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Build Documentation | |
run: mkdocs build | |
- name: Deploy to Vercel | |
uses: npx vercel --token ${{ secrets.VERCEL_TOKEN }} | |
working-directory: site | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} |