Gitea Hugo 构建 action
此 YAML 实现了在 Gitea CI/CD 管道中构建 Hugo 站点的 action。
它要求你向 runner 添加 "hugo:docker://hugomods/hugo:latest" 标签,如如何向基于 docker 的 Gitea act_runner 添加更多标签中所述。
gitea_build_hugo.yml
name: Deploy
run-name: Deploying homepage
on: [push]
jobs:
Build-Hugo:
runs-on: hugo
steps:
# NOTE: hugo:latest image only has /bin/sh, not bash
# Build the site
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build site
run: hugo -F
shell: sh
- name: Upload site as artifact
uses: actions/upload-artifact@v3
with:
name: hugo-site
path: public
include-hidden-files: trueIf this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow