Skip to content

Commit

Permalink
added GAE deploy github action for seunglab neuroglancer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisj committed Jul 27, 2021
1 parent e68669c commit 008c553
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: BuildAndDeploy

on: [push]

jobs:
build-and-deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: npm i
- 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: neuromancer-seung-import
APPLICATION_CREDENTIALS: ${{ secrets.SA_NEUROMANCER_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-neuromancer-seung-import.appspot.com
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

0 comments on commit 008c553

Please sign in to comment.