mirror of
https://github.com/alexandrev/xslt-lab.git
synced 2026-09-21 13:03:15 +00:00
45 lines
966 B
YAML
45 lines
966 B
YAML
name: Publish Hugo site
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths:
|
|
- "site/**"
|
|
- ".github/workflows/publish-hugo.yml"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: deploy-gh-pages
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout main
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Hugo
|
|
uses: peaceiris/actions-hugo@v3
|
|
with:
|
|
hugo-version: "0.125.7"
|
|
extended: true
|
|
|
|
- name: Build
|
|
run: hugo --source site --minify --destination ../hugo-output
|
|
|
|
- name: Deploy to gh-pages
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./hugo-output
|
|
publish_branch: gh-pages
|
|
destination_dir: docs
|
|
keep_files: false
|
|
cname: blog.xsltplayground.com
|