Skip to content

Deploy Production Build of Client for UASC #4053

Deploy Production Build of Client for UASC

Deploy Production Build of Client for UASC #4053

name: Deploy Production Build of Client for UASC
on:
workflow_dispatch:
# schedules this to run every 30 minutes
schedule:
- cron: "30 * * * *"
env:
NEXT_PUBLIC_FIREBASE_API_KEY: ${{secrets.PROD_FIREBASE_API_KEY}}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{secrets.PROD_FIREBASE_AUTH_DOMAIN}}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{secrets.PROD_FIREBASE_PROJECT_ID}}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{secrets.PROD_FIREBASE_STORAGE_BUCKET}}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{secrets.PROD_FIREBASE_MESSAGING_SENDER_ID}}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{secrets.PROD_FIREBASE_APP_ID}}
NEXT_PUBLIC_BACKEND_BASE_URL: ${{secrets.PROD_BACKEND_BASE_URL}}
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{secrets.PROD_MEASUREMENT_ID}}
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ${{secrets.PROD_STRIPE_PK}}
NEXT_PUBLIC_SANITY_PROJECT_ID: ${{secrets.PROD_SANITY_PROJECT_ID}}
NEXT_PUBLIC_SANITY_DATASET: production
NEXT_CONFIG_ENV: production
FRONTEND_BASE_URL: ${{secrets.PROD_FRONTEND_URL}}
jobs:
Deploy-Client:
runs-on: ubuntu-latest
environment: Client Production
steps:
- uses: actions/checkout@v4
with:
ref: stable
- name: Install volta
uses: volta-cli/action@v4
- run: yarn workspaces focus client && yarn workspace client build
- name: Publish to cloudflare
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: uasc
directory: client/out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}