Skip to content

Merge pull request #37 from vemel/dependabot/pip/jinja2-3.1.4 #12

Merge pull request #37 from vemel/dependabot/pip/jinja2-3.1.4

Merge pull request #37 from vemel/dependabot/pip/jinja2-3.1.4 #12

Workflow file for this run

name: Update docs
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
update-docs:
name: Update docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: docs
- name: Install poetry
run: pipx install poetry
- name: Set up Python
id: python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
- name: Reset branch to main
run: |
git fetch origin main:main
git reset --hard main
git rebase main
- name: Install dependencies
run: |
poetry install -n
poetry run pip install -r requirements.mkdocs.txt
- name: Build docs
run: |
poetry run handsdown --external `git config --get remote.origin.url` -o docsmd --cleanup --theme material --branch main
- name: Build html docs
run: |
rm -rf docs
poetry run mkdocs build
- name: Commit docs
run: |
git add docs docsmd
git commit -m "Update docs"
git push -f
- name: Update Read the docs
env:
TOKEN: ${{ secrets.RTD_TOKEN }}
run: |
curl -X POST -H "Authorization: Token ${TOKEN}" https://readthedocs.org/api/v3/projects/handsdown/versions/latest/builds/