fix #18
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 to Vercel | |
| on: | |
| push: | |
| branches: [ "main" ] # 监听 main 分支的推送 | |
| pull_request: | |
| branches: [ "main" ] # 监听针对 main 分支的拉取请求 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 # 检出代码 | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@master | |
| env: | |
| VERSION: ${{ github.sha }} # 当前提交的 SHA 值 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} # Vercel 令牌 | |
| vercel-org-id: ${{ secrets.ORG_ID }} # Vercel 组织 ID | |
| vercel-project-id: ${{ secrets.PROJECT_ID }} # Vercel 项目 ID | |
| working-directory: ./ # 工作目录 | |
| vercel-args: '--prod' # 可选参数,表示生产环境部署 |