1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-21 04:43:16 +00:00
Files
xslt-lab/.github/workflows/publish-hugo.yml
T

45 lines
965 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: true
cname: blog.xsltplayground.com