-
Notifications
You must be signed in to change notification settings - Fork 41
45 lines (39 loc) · 1.1 KB
/
update-docs.yml
File metadata and controls
45 lines (39 loc) · 1.1 KB
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
name: Update documentation website
run-name: ${{ github.actor }} is running CI/CD actions
on:
push:
branches: [main]
paths:
- 'docs/**'
jobs:
deploy-web-gcp:
name: Deploy web app to GCP
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
permissions:
contents: 'read'
id-token: 'write'
steps:
- id: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 22.x
cache: yarn
cache-dependency-path: ./docs/yarn.lock
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'Install dependencies'
run: yarn install --frozen-lockfile
- name: 'Build application'
run: 'yarn build'
- name: 'Set project ID'
run: 'gcloud config set project react-native-header'
- name: 'Deploy'
run: 'yarn deploy --service-account ${{ vars.GCP_SA_EMAIL }}'