More updates! (#176) #22
This file contains 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 API | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'api/**' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
name: Cloudflare Workers | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
uses: ./.github/actions/install-deps | |
- name: Publish | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
workingDirectory: ./api | |
command: deploy --var RELEASE:$GITHUB_SHA --outdir dist | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_BACKEND_PROJECT }} | |
with: | |
environment: production | |
sourcemaps: ./api/dist | |
ignore_missing: true | |
ignore_empty: true | |