Skip to content

Merge pull request #473 from zekker6/renovate/matrixdotorg-synapse-1.x #172

Merge pull request #473 from zekker6/renovate/matrixdotorg-synapse-1.x

Merge pull request #473 from zekker6/renovate/matrixdotorg-synapse-1.x #172

Workflow file for this run

name: "Docs: Release to GitHub pages"
concurrency:
group: gh-pages
cancel-in-progress: false
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.ci/mkdocs/mkdocs.yaml'
- '.github/workflows/docs-release.yaml'
- "docs/**"
permissions:
contents: write
pages: write
deployments: write
jobs:
release-docs:
name: Release documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout charts branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: "src"
fetch-depth: 0
- name: Checkout gh-pages branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: "dest"
ref: "gh-pages"
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install mkdocs
shell: bash
working-directory: src
run: |
pip install -r ./.ci/mkdocs/requirements.txt
- name: Sync charts docs
shell: bash
working-directory: src
run: |
task docs:charts
- name: Build documentation
shell: bash
working-directory: src
run: |
mkdocs build --config-file ./.ci/mkdocs/mkdocs.yaml -d "$PWD/../dest/docs"
- name: Commit changes
shell: bash
working-directory: dest
run: |
git config user.name "zekker6-bot[bot]"
git config user.email "zekker6-bot <87358111+zekker6-bot[bot]@users.noreply.github.com>"
git add docs
git commit -m "Updated docs from ref: $GITHUB_SHA"
git push