Skip to content

Commit 94acc6f

Browse files
Add GitHub Actions workflow for deploying to Google App Engine (#1240)
Co-authored-by: Barry Pollard <barry_pollard@hotmail.com>
1 parent 84d44b3 commit 94acc6f

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
######################################
2+
## Custom HTTP Archive GitHub action ##
3+
######################################
4+
#
5+
# Deploys the website to Google App Engine (production) on every push to main.
6+
# Requires a GCP service account key stored as the GCP_SA_KEY repository secret.
7+
#
8+
name: Deploy to Production
9+
10+
on:
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
deploy:
17+
name: Build and Deploy to App Engine
18+
runs-on: ubuntu-latest
19+
if: github.repository == 'HTTPArchive/httparchive.org'
20+
steps:
21+
- name: Checkout branch
22+
uses: actions/checkout@v6
23+
24+
- name: Setup Node.js for use with actions
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: '24'
28+
29+
- name: Set up Python 3.14
30+
uses: actions/setup-python@v6
31+
with:
32+
python-version: '3.14'
33+
34+
- name: Install Node dependencies
35+
run: npm install
36+
37+
- name: Install Python dependencies
38+
run: pip install -r requirements.txt
39+
40+
- name: Build static assets
41+
run: npm run build
42+
43+
- name: Update timestamps
44+
run: npm run timestamps
45+
46+
- name: Generate scripts
47+
run: npm run generate
48+
49+
- name: Authenticate to Google Cloud
50+
uses: google-github-actions/auth@v3
51+
with:
52+
credentials_json: ${{ secrets.GCP_SA_KEY }}
53+
54+
- name: Set up Cloud SDK
55+
uses: google-github-actions/setup-gcloud@v2
56+
57+
- name: Deploy to App Engine
58+
run: echo "Y" | gcloud app deploy --project httparchive

0 commit comments

Comments
 (0)