forked from OpenCircuits/OpenCircuits
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.61 KB
/
deploy_nightly.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build and Deploy the nightly and documentation sites for the up-to-date code
env:
CLOUDSDK_CORE_PROJECT: opencircuits-nightly
concurrency:
group: deploy-night-workflow
cancel-in-progress: true
on:
push:
branches:
- master
jobs:
setup-build-deploy:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup GCloud
uses: google-github-actions/setup-gcloud@master
with:
version: '274.0.0'
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Set Node.js 16.x
uses: actions/setup-node@master
with:
node-version: 16.x
- name: Install
run: yarn
# Build nightly site
- name: Build
env:
OC_OAUTH2_ID: ${{ secrets.OAUTH_ID }}
OC_AUTH_TYPES: google
OC_GA_ID: UA-201145837-1
run: |
yarn build --ci --prod server digital
- name: Create OAuth credentials and app.yaml
run: |
echo "${{ secrets.OAUTH_CREDENTIALS }}" >> ./build/credentials.json
echo "${{ secrets.APP_YAML }}" >> ./build/app.yaml
- name: Deploy
working-directory: ./build
run: gcloud app deploy --quiet
# Build docs site
- name: Build Docs
run: |
yarn build:jsdocs
yarn build:docs
- name: Upload Docs to GCS
uses: google-github-actions/upload-cloud-storage@main
with:
path: src/site/pages/docs/build
destination: docs.opencircuits.io
parent: false