Publish Hugo site with GitHub Actions
Published:
, Updated:
Talks about:
<a class="post-tag post-tag-github" href="/tags/github">github</a>, <a class="post-tag post-tag-github-actions" href="/tags/github-actions">github actions</a>, <a class="post-tag post-tag-hugo" href="/tags/hugo">hugo</a>, and <a class="post-tag post-tag-publish" href="/tags/publish">publish</a>
The peaceiris/actions-gh-pages action allows to publish a Hugo site in your GitHub Action.
name: <PIPELINE>
jobs:
build:
runs-on: <RUN_ON>
steps:
- name: Deploy Website
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: <PUBLISH_DIR>
force_orphan: true
cname: <CNAME>
<PIPELINE>
: The name of your pipeline.<RUN_ON>
: The runner to use, see GitHub’s own documentation for possible values.<PUBLISH_DIR>
: The file system location of the built site.<CNAME>
: TheCNAME
of your custom domain.