Skip to content

Commit

Permalink
test out cloudflare deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev committed Aug 11, 2024
1 parent b2b9e65 commit de51d97
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test-cloudfront.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy Production Build of Client for UASC

on:
pull_request

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
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: YOUR_PROJECT_NAME
directory: client/out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit de51d97

Please sign in to comment.