Skip to content

Improve host bootstrapping process #445

Improve host bootstrapping process

Improve host bootstrapping process #445

Workflow file for this run

---
name: Build and publish documentation site
on: # yamllint disable-line rule:truthy
push:
paths:
- ".github/workflows/documentation.yaml"
- "websites-src/home-lab-docs/**"
- "config/mkdocs/home-lab-docs/**"
- scripts/run-mkdocs.sh
pull_request:
paths:
- ".github/workflows/documentation.yaml"
- "websites-src/home-lab-docs/**"
- "config/mkdocs/home-lab-docs/**"
- scripts/run-mkdocs.sh
workflow_dispatch: null
permissions:
contents: read
jobs:
build-push-documentation-site:
permissions:
# To commit the newly built documentation site
contents: write
concurrency:
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# github.head_ref: head_ref or source branch of the pull request
# github.ref: ref of the branch that triggered the workflow
group: ${{ github.workflow }}-build-push-home-lab-docs-site-${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}-${{ github.event_name }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout the current repository
uses: actions/checkout@v5
with:
persist-credentials: true
- name: Build the home-lab-docs site
run: |
scripts/run-mkdocs.sh "build" "home-lab-docs" "./websites-src/home-lab-docs" "./docs"
- name: Commit and push updates to the home-lab-docs site
if: >
github.event.pull_request.user.login != 'dependabot[bot]' &&
github.event_name == 'pull_request' &&
github.ref_name != github.event.repository.default_branch
uses: stefanzweifel/git-auto-commit-action@v5.2.0
with:
branch: "${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}"
commit_message: "chore: update home-lab-docs site"
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com