Skip to content

Update deploy.yaml

Update deploy.yaml #9

Workflow file for this run

name: GCS Deployment
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [main]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: arcane-timer-289817
- name: Deploy via GCS
run: |
gsutil -m rm -rf gs://brianopdedijk.nl/* || echo "$?"
gsutil -m cp -r * gs://brianopdedijk.nl/
push:
needs: build # The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
ref: 'deploy'
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: arcane-timer-289817
- name: Deploy via GCS
run: |
gsutil -m rm -rf gs://brianopdedijk.nl/* || echo "$?"
gsutil -m cp -r * gs://brianopdedijk.nl/