根据Vercel社区的反馈,将rewrites改为redirects。 #13
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 Materials to Vercel | |
| 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 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Dependencies | |
| run: pip install -r requirements.txt | |
| - name: Build Documentation | |
| run: mkdocs build | |
| - name: Deploy to Vercel | |
| run: npx vercel --token ${{ secrets.VERCEL_TOKEN }} --prod | |
| working-directory: site | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} |