Skip to content

Version 4.22.2

Version 4.22.2 #81

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
permissions: write-all
name: Deploy release
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Build app
shell: bash
run: pnpm build
env:
NEXT_PUBLIC_GOOGLE_ANALYTICS_DOMAIN: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_DOMAIN }}
NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS_TRACKING_ID }}
NEXT_PUBLIC_IS_PRODUCTION: true
NEXT_PUBLIC_N8N_WEBHOOK_URL: ${{ secrets.NEXT_PUBLIC_N8N_WEBHOOK_URL }}
NEXT_PUBLIC_HOST_URL: 'https://docs.safe.global'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
# Deploy the main branch to production environment
- name: Deploy to the production S3
env:
BUCKET: s3://${{ secrets.AWS_STAGING_BUCKET_NAME }}/releases/${{ github.event.release.tag_name }}
run: bash ./.github/scripts/s3_upload.sh
# Script to prepare production deployments
- run: bash ./.github/scripts/prepare_production_deployment.sh
env:
PROD_DEPLOYMENT_HOOK_TOKEN: ${{ secrets.PROD_DEPLOYMENT_HOOK_TOKEN }}
PROD_DEPLOYMENT_HOOK_URL: ${{ secrets.PROD_DEPLOYMENT_HOOK_URL }}
VERSION_TAG: ${{ github.event.release.tag_name }}