Skip to content

Add a publish workflow (#25) #1

Add a publish workflow (#25)

Add a publish workflow (#25) #1

Workflow file for this run

name: Publish site
on:
push:
branches:
- main
workflow_dispatch:
# Cancel active CI runs for a PR before starting another run
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash # https://github.com/beeware/briefcase/pull/912
env:
FORCE_COLOR: "1"
jobs:
publish:
name: Build and publish site
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.X"
cache: pip
cache-dependency-path: |
pyproject.toml
.pre-commit-config.yaml
- name: Update pip
run: python -m pip install -U pip
- name: Install Tox
run: python -m pip install --group 'tox-uv'
- name: Build the site
run: python -m tox -e docs-all
- name: Deploy the built files
uses: JamesIves/[email protected]
with:
folder: _build/html # The folder the action should deploy.
branch: gh-pages # The branch to which the action should deploy.
git-config-name: github-actions[bot]
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com