-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e97d2c
commit 355c25e
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
104 changes: 104 additions & 0 deletions
104
.github/workflows/application-js-cloudflare-feature.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
name: "CI / Application JS Cloudflare Feature" | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
GH_TOKEN: | ||
required: true | ||
CLOUDFLARE_ACCOUNT_ID: | ||
required: true | ||
CLOUDFLARE_ZONE_ID: | ||
required: true | ||
CLOUDFLARE_API_TOKEN: | ||
required: true | ||
ZETA_HOUSE_ENV: | ||
required: true | ||
ZETA_HOUSE_SUPABASE_URL: | ||
required: true | ||
ZETA_HOUSE_SUPABASE_KEY: | ||
required: true | ||
ZETA_HOUSE_SENDGRID_API_KEY: | ||
required: true | ||
ZETA_HOUSE_GOOGLE_MAPS_API_KEY: | ||
required: true | ||
|
||
jobs: | ||
# Lint the code | ||
feature-lint: | ||
name: "Feature / Lint" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/matrixai/github-runner | ||
permissions: | ||
packages: read | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run linting | ||
run: | | ||
nix develop .#ci --command bash -c $' | ||
npm run lint | ||
' | ||
# Build the public | ||
feature-build: | ||
name: "Feature / Build" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/matrixai/github-runner | ||
permissions: | ||
packages: read | ||
contents: read | ||
actions: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run build | ||
run: | | ||
nix develop .#ci --command bash -c $' | ||
npm run build --verbose | ||
' | ||
- name: Upload Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: public | ||
path: ./public | ||
|
||
# Deploy the public | ||
feature-deployment: | ||
name: "Feature / Deployment" | ||
runs-on: ubuntu-latest | ||
needs: feature-build | ||
container: | ||
image: ghcr.io/matrixai/github-runner | ||
concurrency: | ||
group: feature-deployment | ||
cancel-in-progress: false | ||
steps: | ||
- run: entrypoint | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: public | ||
path: ./public | ||
- name: Run deployment | ||
env: | ||
name: "feature/${{ github.ref_name }}" | ||
url: "https://${{ github.ref_name }}.dev.zeta.house" | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
ZETA_HOUSE_ENV: ${{ secrets.ZETA_HOUSE_ENV }} | ||
ZETA_HOUSE_SUPABASE_URL: ${{ secrets.ZETA_HOUSE_SUPABASE_URL }} | ||
ZETA_HOUSE_SUPABASE_KEY: ${{ secrets.ZETA_HOUSE_SUPABASE_KEY }} | ||
ZETA_HOUSE_SENDGRID_API_KEY: ${{ secrets.ZETA_HOUSE_SENDGRID_API_KEY }} | ||
ZETA_HOUSE_GOOGLE_MAPS_API_KEY: ${{ secrets.ZETA_HOUSE_GOOGLE_MAPS_API_KEY }} | ||
run: | | ||
echo 'Perform service deployment for feature' | ||
nix develop .#ci --command bash -c $' | ||
npm run deploy -- \ | ||
--feature "$GITHUB_REF_NAME" \ | ||
--env "$GITHUB_REF_NAME" | ||
' |
Empty file.
Empty file.