Skip to content

Dummy commit to trigger build #11

Dummy commit to trigger build

Dummy commit to trigger build #11

Workflow file for this run

name: 'Deploy to Dev'
on:
push:
branches:
- 'develop'
jobs:
build-push-deploy:
name: 'Build and Deploy to Development'
runs-on: ubuntu-latest
# Checkout the repository to the GitHub Actions runner
steps:
- name: Checkout
uses: actions/checkout@v2
# gcloud CLI setup
- name: Login to GCP
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEV_SA_KEY }}
project_id: ${{ secrets.SV_PROJ_NAME }}
export_default_credentials: true
- name: Build Container Image
run: |-
docker build \
-t "gcr.io/${{ secrets.SV_PROJ_NAME }}/skyviewer-client:${{ github.sha }}" \
--build-arg NEXT_PUBLIC_API_URL=https://skyviewer-api-dot-skyviewer.uw.r.appspot.com/api \
--build-arg NEXT_PUBLIC_BASE_URL=https://skyviewer-client-dot-skyviewer.uw.r.appspot.com \
--build-arg NEXT_PUBLIC_ASSETS_BASE_URL=https://skyviewer-api-dot-skyviewer.uw.r.appspot.com/assets \
--build-arg NEXT_PUBLIC_ASTRO_API_URL=https://us-central1-skyviewer.cloudfunctions.net/astro-objects-api \
.
- name: Configure Docker Auth
run: gcloud --quiet auth configure-docker
- name: Push Container Image to GCR
run: docker push gcr.io/${{ secrets.SV_PROJ_NAME }}/skyviewer-client:${{ github.sha }}
- name: Get app.yaml
run: gcloud secrets versions access latest --secret=skyviewer-client-appyaml > app.yaml
- name: Deploy to App Engine
run: |-
gcloud app deploy app.yaml \
--quiet \
--image-url=gcr.io/${{ secrets.SV_PROJ_NAME }}/skyviewer-client:${{ github.sha }} \
--promote \
--project=${{ secrets.SV_PROJ_NAME }}