Skip to content

Commit 355c25e

Browse files
committed
wip: add website workflows
1 parent 4e97d2c commit 355c25e

File tree

3 files changed

+104
-0
lines changed

3 files changed

+104
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: "CI / Application JS Cloudflare Feature"
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
GH_TOKEN:
7+
required: true
8+
CLOUDFLARE_ACCOUNT_ID:
9+
required: true
10+
CLOUDFLARE_ZONE_ID:
11+
required: true
12+
CLOUDFLARE_API_TOKEN:
13+
required: true
14+
ZETA_HOUSE_ENV:
15+
required: true
16+
ZETA_HOUSE_SUPABASE_URL:
17+
required: true
18+
ZETA_HOUSE_SUPABASE_KEY:
19+
required: true
20+
ZETA_HOUSE_SENDGRID_API_KEY:
21+
required: true
22+
ZETA_HOUSE_GOOGLE_MAPS_API_KEY:
23+
required: true
24+
25+
jobs:
26+
# Lint the code
27+
feature-lint:
28+
name: "Feature / Lint"
29+
runs-on: ubuntu-latest
30+
container:
31+
image: ghcr.io/matrixai/github-runner
32+
permissions:
33+
packages: read
34+
contents: read
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Run linting
38+
run: |
39+
nix develop .#ci --command bash -c $'
40+
npm run lint
41+
'
42+
43+
# Build the public
44+
feature-build:
45+
name: "Feature / Build"
46+
runs-on: ubuntu-latest
47+
container:
48+
image: ghcr.io/matrixai/github-runner
49+
permissions:
50+
packages: read
51+
contents: read
52+
actions: write
53+
steps:
54+
- uses: actions/checkout@v4
55+
- name: Run build
56+
run: |
57+
nix develop .#ci --command bash -c $'
58+
npm run build --verbose
59+
'
60+
- name: Upload Build
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: public
64+
path: ./public
65+
66+
# Deploy the public
67+
feature-deployment:
68+
name: "Feature / Deployment"
69+
runs-on: ubuntu-latest
70+
needs: feature-build
71+
container:
72+
image: ghcr.io/matrixai/github-runner
73+
concurrency:
74+
group: feature-deployment
75+
cancel-in-progress: false
76+
steps:
77+
- run: entrypoint
78+
- uses: actions/checkout@v4
79+
with:
80+
lfs: true
81+
- uses: actions/download-artifact@v4
82+
with:
83+
name: public
84+
path: ./public
85+
- name: Run deployment
86+
env:
87+
name: "feature/${{ github.ref_name }}"
88+
url: "https://${{ github.ref_name }}.dev.zeta.house"
89+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
90+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
91+
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
92+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
93+
ZETA_HOUSE_ENV: ${{ secrets.ZETA_HOUSE_ENV }}
94+
ZETA_HOUSE_SUPABASE_URL: ${{ secrets.ZETA_HOUSE_SUPABASE_URL }}
95+
ZETA_HOUSE_SUPABASE_KEY: ${{ secrets.ZETA_HOUSE_SUPABASE_KEY }}
96+
ZETA_HOUSE_SENDGRID_API_KEY: ${{ secrets.ZETA_HOUSE_SENDGRID_API_KEY }}
97+
ZETA_HOUSE_GOOGLE_MAPS_API_KEY: ${{ secrets.ZETA_HOUSE_GOOGLE_MAPS_API_KEY }}
98+
run: |
99+
echo 'Perform service deployment for feature'
100+
nix develop .#ci --command bash -c $'
101+
npm run deploy -- \
102+
--feature "$GITHUB_REF_NAME" \
103+
--env "$GITHUB_REF_NAME"
104+
'

.github/workflows/application-js-cloudflare-master.yml

Whitespace-only changes.

.github/workflows/application-js-cloudflare-staging.yml

Whitespace-only changes.

0 commit comments

Comments
 (0)