feat: init #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 to Cloudflare Workers | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run type check | |
| run: pnpm typecheck | |
| - name: Run linter and formatter | |
| run: pnpm check | |
| - name: Run tests | |
| run: pnpm test:run | |
| deploy: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Deploy to Cloudflare Workers | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: deploy | |
| secrets: | | |
| ACCESS_CLIENT_ID | |
| ACCESS_CLIENT_SECRET | |
| ACCESS_TOKEN_URL | |
| ACCESS_AUTHORIZATION_URL | |
| ACCESS_JWKS_URL | |
| COOKIE_ENCRYPTION_KEY | |
| CIRCLECI_TOKEN | |
| CIRCLECI_BASE_URL | |
| env: | |
| ACCESS_CLIENT_ID: ${{ secrets.ACCESS_CLIENT_ID }} | |
| ACCESS_CLIENT_SECRET: ${{ secrets.ACCESS_CLIENT_SECRET }} | |
| ACCESS_TOKEN_URL: ${{ secrets.ACCESS_TOKEN_URL }} | |
| ACCESS_AUTHORIZATION_URL: ${{ secrets.ACCESS_AUTHORIZATION_URL }} | |
| ACCESS_JWKS_URL: ${{ secrets.ACCESS_JWKS_URL }} | |
| COOKIE_ENCRYPTION_KEY: ${{ secrets.COOKIE_ENCRYPTION_KEY }} | |
| CIRCLECI_TOKEN: ${{ secrets.CIRCLECI_TOKEN }} | |
| CIRCLECI_BASE_URL: ${{ secrets.CIRCLECI_BASE_URL }} |