feat: 添加可选身份认证支持,验证 Bearer Token #8
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 Deno Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Needed for auth with Deno Deploy | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: v1.x | |
| - name: Build project | |
| run: deno cache deploy.ts | |
| - name: Deploy to Deno Deploy | |
| uses: denoland/deployctl@v1 | |
| with: | |
| project: ${{ secrets.DENO_PROJECT_ID || 'langfast2api' }} | |
| entrypoint: "deploy.ts" | |
| token: ${{ secrets.DENO_DEPLOY_TOKEN }} |