Skip to content

coregistration: add practice: fix: installation #31

coregistration: add practice: fix: installation

coregistration: add practice: fix: installation #31

Workflow file for this run

name: docs
on:
push:
branches: [ main ]
tags: [ 'v*' ]
# workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build translation catalogs
run: sphinx-intl build -d docs/locale
- name: Build Sphinx HTML
run: sphinx-build -b html docs/source docs/_build/html
# multilengual build steps
- name: Build Sphinx HTML (multi-language)
run: |
sphinx-build -b html -D language=en docs/source docs/_build/html/en
sphinx-build -b html -D language=fr docs/source docs/_build/html/fr
sphinx-build -b html -D language=es docs/source docs/_build/html/es
- name: Zip site for release asset
run: |
cd docs/_build/html
zip -r ../../site.zip .
- name: Upload artifact (Pages)
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
- name: Upload artifact (release asset)
uses: actions/upload-artifact@v4
with:
name: site-zip
path: docs/site.zip
deploy:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
release:
# only run when the ref is a tag (v*)
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download site zip
uses: actions/download-artifact@v4
with:
name: site-zip
path: .
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
files: |
docs/site.zip