-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (47 loc) · 1.47 KB
/
depoloy-prod-gcp.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy to prod
on:
workflow_dispatch:
push:
branches:
- master
env:
CI: true
TZ: Europe/Amsterdam
permissions:
contents: write
pages: write
jobs:
deploy-prod:
name: Deploy application to prod
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Run tests
run: npm run test
- name: Build application
run: npm run build:prod
env:
PUBLIC_URL: https://veilarbvisittkortfs.intern.nav.no
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCS_SA_KEY_PROD }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Upload files to GCS
run: gsutil -m rsync -r build gs://veilarbvisittkortfs-prod
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Release to prod
target_commitish: master
tag_name: release/prod@${{ github.sha }}
prerelease: false