helm-charts/.github/workflows/docs-release.yaml
bjw-s-bot[bot] 60482f2198
ci(github-action): update ghcr.io/bjw-s/mdbook:0.4.25 docker digest to 36623a9 (#108)
Co-authored-by: bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>
2023-01-12 06:57:53 +00:00

45 lines
1.3 KiB
YAML

name: "Docs: Release to GitHub pages"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/docs-release.yaml"
- "docs/**"
jobs:
release-docs:
name: Release documentation
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Get GitHub API token
id: get-app-token
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.BJWS_APP_ID }}
private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }}
- name: Checkout main branch
uses: actions/checkout@v3
with:
token: ${{ steps.get-app-token.outputs.token }}
fetch-depth: 0
- name: Build docs
uses: docker://ghcr.io/bjw-s/mdbook:0.4.25@sha256:36623a9d0fa396cc4437c4ce774d5b3ae13c2a24ae3e3c6537b24a9a85bda2cb
with:
args: bash -c "cd docs && mdbook build"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3.9.1
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ steps.get-app-token.outputs.token }}
publish_dir: ./docs/book/html
destination_dir: docs
user_name: 'bjw-s-bot[bot]'
user_email: 'bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>'