Merge pull request #4518 from luke-h1/dev #710
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: | |
branches: | |
- dev | |
- main | |
workflow_dispatch: | |
env: | |
NEW_RELIC_APP_NAME: ${{ secrets.NEW_RELIC_APP_NAME }} | |
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
NEXT_PUBLIC_URL: ${{ secrets.NEXT_PUBLIC_URL }} | |
NEXT_PUBLIC_SANITY_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_SANITY_PROJECT_ID }} | |
VERCEL_PROD_PROJECT_ID: ${{ secrets.VERCEL_PROD_PROJECT_ID }} | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DEV_PROJECT_ID }} | |
BASIC_AUTH_USER: ${{ secrets.BASIC_AUTH_USER }} | |
BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }} | |
PNPM_VERSION: 9.4.0 | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: luke-h1 | |
jobs: | |
deploy-dev: | |
runs-on: ubuntu-latest | |
name: Deploy to dev | |
if: github.ref == 'refs/heads/dev' && github.event_name != 'pull_request' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Build | |
uses: ./.github/actions/build | |
- name: Deploy to dev | |
uses: ./.github/actions/deploy | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_DEV_PROJECT_ID }} | |
environment: dev | |
deploy-live: | |
runs-on: ubuntu-latest | |
name: Deploy to live | |
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Build | |
uses: ./.github/actions/build | |
- name: Deploy to live | |
uses: ./.github/actions/deploy | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROD_PROJECT_ID }} | |
environment: prod |