Files
bonsai/.github/workflows/deploy.yml
T
tiennm99 0f14f4523d ci: add build workflow, dependabot config, and Pages deploy
- build.yml: hugo extended 0.154.0, runs on PR + main push, uploads
  exampleSite artifact for inspection
- deploy.yml: deploys exampleSite to GitHub Pages on main push using
  actions/configure-pages + actions/deploy-pages (modern flow, no
  gh-pages branch)
- dependabot.yml: weekly action version updates

One-time manual: enable Pages in repo settings (Source = GitHub Actions)
before deploy.yml will succeed.
2026-05-01 14:17:00 +07:00

58 lines
1.1 KiB
YAML

name: deploy
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- id: pages
uses: actions/configure-pages@v5
- name: Setup Hugo Extended
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.154.0'
extended: true
- name: Build with production baseURL
working-directory: exampleSite
run: |
hugo \
--gc \
--minify \
--themesDir ../.. \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: exampleSite/public
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: deployment
uses: actions/deploy-pages@v4