Skip to content

Commit 5a3ebb8

Browse files
committed
Add GitHub workflow for Hugo build.
1 parent 044d4ec commit 5a3ebb8

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/hugo-build.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Example workflow calling Hugo build
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
uses: potherca/hugo-build/.github/workflows/hugo-build.yaml@main
16+
with:
17+
# Use README.md files as folder index
18+
build-readme-as-index: true
19+
# Configuration for in the root of the Hugo config.
20+
config-root-keys: |
21+
"languageCode": "en-us",
22+
"title": "Muze Documentation"
23+
24+
deploy:
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
if: github.ref == 'refs/heads/main'
29+
name: Deploy to GitHub Pages
30+
needs: build
31+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
32+
permissions:
33+
pages: write # To deploy to Pages
34+
id-token: write # To verify the deployment originating source
35+
runs-on: ubuntu-latest
36+
steps:
37+
- id: deployment
38+
name: Deploy to GitHub Pages
39+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)