Skip to content

Add automatic deployment GH Action #15

Add automatic deployment GH Action

Add automatic deployment GH Action #15

Workflow file for this run

name: Build HUGO website
on:
# Runs on pull requests to check that the website is building without errors
pull_request:
# Runs on push/merge to main to deploy the new website
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
# Checkout repo AND ITS SUBMODULES
- name: 🛒 Checkout
uses: actions/checkout@v3
with:
submodules: recursive
# Build the static website with the provided docker-compose rules
- name: 🛠️ Build with HUGO
run: |
docker compose up builder
# Upload build artifacts for deployment or download
- name: 🚀 Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: ./build/blog
deploy:
needs: [build]
if: ${{ github.event_name == "push" }}

Check failure on line 39 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build HUGO website

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 39, Col: 9): Unexpected symbol: '"push"'. Located at position 22 within expression: github.event_name == "push"
runs-on: ubuntu-latest
steps:
- name: 🛠️ Setup build directory
run: |
mkdir -p build/blog
- name: 📥 Download build Artifacts
uses: actions/download-artifact@v3
with:
name: build
path: build/blog
- run: tree