Skip to content

Commit

Permalink
workflow for building doc pages
Browse files Browse the repository at this point in the history
  • Loading branch information
m-reuter committed Nov 29, 2023
1 parent 94fe603 commit 814fb5e
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: doc
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches: [main]
workflow_dispatch:

jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ./main
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
architecture: 'x64'
- name: Install package
run: |
python -m pip install --progress-bar off --upgrade pip setuptools wheel
python -m pip install --progress-bar off stable/.[doc]
- name: Display system information
run: fsqc-sys_info --developer
- name: Build doc
run: TZ=UTC sphinx-build ./stable/doc ./doc-build/dev -W --keep-going
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: doc-dev
path: ./doc-build/dev

deploy:
if: github.event_name == 'push'
needs: build
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
shell: bash
steps:
- name: Download documentation
uses: actions/download-artifact@v3
with:
name: doc-dev
path: ./doc-dev
- name: Deploy dev documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc-dev
destination_dir: ./dev
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

0 comments on commit 814fb5e

Please sign in to comment.