Skip to content

Commit

Permalink
docs: publish documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
hrnn committed Jul 6, 2024
1 parent b6a5bd9 commit be40c38
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Generate Documentation

on:
push:
branches:
- feat/docs

jobs:
run_script:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry

- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'

- name: Install dependencies with Poetry
run: poetry install --only docs --no-interaction

- name: Generate tutorial docs
run: |
make build/docs
- name: Switch to page Branch
uses: actions/checkout@v3
with:
ref: pages
clean: false

- name: Configure Git User
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Add docs to git
run: |
mv site/* .
git add .
- name: Commit Changes
run: |
git commit -m "updated docs"
git --no-pager log -p -2
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: pages
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ test:
serve/docs:
# Start the documentation server
$(POETRY) run mkdocs serve

build/docs:
# Builds the documentation
$(POETRY) run mkdocs build -d site

0 comments on commit be40c38

Please sign in to comment.