update to new gcloud actions #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
name: deploy | |
jobs: | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
steps: | |
# Setup. | |
- uses: actions/checkout@master | |
# Run tests. Failure will abort deployment. | |
- name: go test | |
uses: cedrickring/[email protected] | |
# Auth glcoud command. | |
- uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: ${{ secrets.GCLOUD_AUTH }} | |
# Setup gcloud command. | |
- uses: google-github-actions/setup-gcloud@v2 | |
with: | |
version: '275.0.0' | |
# Build new deployable image. | |
- run: gcloud builds submit --tag gcr.io/npmfs-242515/website | |
env: | |
CLOUDSDK_CORE_PROJECT: npmfs-242515 | |
# Deploy new image. | |
- run: gcloud --quiet run deploy --image gcr.io/npmfs-242515/website --allow-unauthenticated --region=us-central1 --timeout=8s website --platform=managed | |
env: | |
CLOUDSDK_CORE_PROJECT: npmfs-242515 |