Skip to content

Deploy to Staging

Deploy to Staging #204

Workflow file for this run

name: Deploy to Staging
concurrency: staging
on:
workflow_run:
workflows: [Tests]
branches: [main]
types: [completed]
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: staging
url: "https://vlach-cookbook-staging.fly.dev/"
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Upload commits to Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: jeffrey-yasskin
SENTRY_PROJECT: vlach-cookbook
with:
environment: staging
finalize: false
version: ${{ github.sha }}
set_commits: auto
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Update the staging deployment.
run: |
flyctl deploy webserver \
--build-arg GOOGLE_SITE_VERIFICATION="$GOOGLE_SITE_VERIFICATION" \
--build-arg SENTRY_DSN="$SENTRY_DSN" \
--build-secret SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN" \
--build-arg SENTRY_RELEASE="$GITHUB_SHA" \
--build-arg SENTRY_ENVIRONMENT=staging
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
GOOGLE_SITE_VERIFICATION: ${{ vars.GOOGLE_SITE_VERIFICATION }}
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NO_COLOR: 1