Skip to content

Add GitHub Actions workflow for Hugo deployment #1

Add GitHub Actions workflow for Hugo deployment

Add GitHub Actions workflow for Hugo deployment #1

Workflow file for this run

name: Hugo Deploy
on:
push:
branches:
- main
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Hugo
uses: peaceiris/actions-hugo@v4
with:
hugo-version: '0.152.2' # latest
- name: Build Hugo site
run: hugo -D
- name: Setup GCP Credentials
run: echo "${{ secrets.GCP_SA_KEY }}" > $HOME/gcp-key.json

Check failure on line 24 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 24
- - name: Sync files to GCS
env:
GOOGLE_APPLICATION_CREDENTIALS: $HOME/gcp-key.json
run: gsutil -m rsync -r ./public gs://${{ secrets.GCP_BUCKET }}