Skip to content

Commit 2852a08

Browse files
gcp deploy
1 parent afe1fdd commit 2852a08

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy to prod
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
env:
8+
CI: true
9+
TZ: Europe/Amsterdam
10+
11+
jobs:
12+
deploy-prod:
13+
name: Deploy application to prod
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
- name: Setup node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 12
22+
cache: npm
23+
- name: Install dependencies
24+
run: npm ci
25+
- name: Run tests
26+
run: npm run test
27+
- name: Build application
28+
run: npm run build:gcp
29+
- name: Authenticate to Google Cloud
30+
uses: google-github-actions/auth@v0
31+
with:
32+
credentials_json: ${{ secrets.GCS_SA_KEY_PROD }}
33+
- name: Set up Cloud SDK
34+
uses: google-github-actions/setup-gcloud@v0
35+
- name: Upload files to GCS
36+
run: gsutil -m rsync -r build gs://obo-beslutteroversikt-prod

0 commit comments

Comments
 (0)