Update dependency @sentry/remix to v7.71.0 #309
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 | |
on: [push] | |
jobs: | |
infra: | |
runs-on: ubuntu-latest | |
name: Infrastructure | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Retrieve Terraform State | |
uses: cloudflare/[email protected] | |
with: | |
command: kv:namespace list > .kv_namespace_list.json | |
postCommands: jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' .kv_namespace_list.json | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
- name: Init Terraform | |
run: terraform init | |
working-directory: ./.terraform | |
- name: Download Terraform State | |
uses: cloudflare/[email protected] | |
with: | |
command: kv:key get --namespace-id=${{ env.tfstate_kv }} terraform.tfstate > ./.terraform/terraform.tfstate | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
postCommands: chmod 777 ./.terraform/terraform.tfstate | |
if: ${{ env.tfstate_kv != '' }} | |
- name: Configure | |
run: terraform plan && terraform apply -auto-approve | |
working-directory: ./.terraform | |
env: | |
TF_VAR_cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
TF_VAR_cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
TF_VAR_sentry_dsn: ${{ secrets.SENTRY_DSN }} | |
- name: Init Terraform State | |
uses: cloudflare/[email protected] | |
if: ${{ env.tfstate_kv == '' }} | |
with: | |
command: kv:namespace list > .kv_namespace_list.json | |
postCommands: jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' .kv_namespace_list.json | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
- name: Store Terraform State | |
uses: cloudflare/[email protected] | |
with: | |
command: kv:key put --namespace-id=${{ env.tfstate_kv }} terraform.tfstate --path=./.terraform/terraform.tfstate | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
app: | |
runs-on: ubuntu-latest | |
name: Application | |
needs: infra | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: npm | |
- name: Install NPM packages | |
run: npm ci | |
- name: Publish to Cloudflare Workers | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
secrets: | | |
CLOUDFLARE_API_TOKEN | |
CLOUDFLARE_ACCOUNT_ID | |
SENTRY_DSN | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
- name: Build Pages | |
run: npm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
command: pages deploy public --branch=${{ github.head_ref || github.ref_name }} --project-name=dispoflare | |
- name: Generate sourcemap | |
run: npm run build -- --sourcemap | |
- name: Create a Sentry release | |
uses: getsentry/action-release@v1 | |
continue-on-error: true | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
with: | |
environment: production | |
sourcemaps: ./functions ./public | |
set_commits: skip |