helm-charts/.github/workflows/docs-release.yaml
lab-assistant[bot] 26590a084d
ci(github-action): update actions/create-github-app-token ( v2.0.5 → v2.0.6 )
| datasource  | package                         | from   | to     |
| ----------- | ------------------------------- | ------ | ------ |
| github-tags | actions/create-github-app-token | v2.0.5 | v2.0.6 |
2025-05-03 22:20:15 +00:00

85 lines
2.3 KiB
YAML

name: "Docs: Release to GitHub pages"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/docs-release.yaml"
- ".ci/mkdocs/mkdocs.yml"
- "docs/**"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build-docs:
name: Build documentation
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Generate Token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: app-token
with:
app-id: ${{ secrets.LAB_ASSISTANT_APP_ID }}
private-key: ${{ secrets.LAB_ASSISTANT_APP_KEY }}
- name: Checkout main branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: 3.x
- name: Install requirements
run: pip install -r docs/requirements.txt
- name: Build and publish docs
run: mkdocs build -f .ci/mkdocs/mkdocs.yml
- name: Deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ steps.app-token.outputs.token }}
publish_dir: ./site
destination_dir: docs
publish-docs:
name: Publish documentation
runs-on: ubuntu-24.04
needs:
- build-docs
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout main branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src
- name: Checkout gh-pages branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: gh-pages
path: gh-pages
- name: Deploy changes to GitHub Pages
uses: ./src/.github/actions/publish-folder-to-pages
with:
path: gh-pages/
deleteArtifactAfterPublish: true