-
Notifications
You must be signed in to change notification settings - Fork 7
53 lines (49 loc) · 1.71 KB
/
on_dev_branch_push.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
name: BuildAndDeployDevBranch
on:
push:
branches-ignore:
- 'master'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: git submodule init
- run: git submodule update
- run: npm i
- run: cd third_party/neuroglancer/ && npm i && cd ../.
- run: npm run build
- run: cp -r ./dist/dev appengine/frontend/static/
- name: Extract branch name
id: get_branch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/} | tr / - | tr _ -)"
- run: echo ${{ steps.get_branch.outputs.branch }}
- name: start deployment
uses: bobheadxi/[email protected]
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ steps.get_branch.outputs.branch }}
desc: Setting up staging deployment for ${{ steps.get_branch.outputs.branch }}
- name: deploy to gcloud dev branch
uses: actions-hub/gcloud@master
env:
PROJECT_ID: seung-lab
APPLICATION_CREDENTIALS: ${{ secrets.SA_GOOGLE_APPS_DEPLOY }}
with:
args: app deploy appengine/frontend/app.yaml --no-promote --version ${{ steps.get_branch.outputs.branch }}
- name: update deployment status
uses: bobheadxi/[email protected]
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ steps.deployment.outputs.env }}
env_url: https://${{ steps.get_branch.outputs.branch }}-dot-ngextend-dot-seung-lab.appspot.com
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}