Skip to content

build(deps): bump mkdocs-git-revision-date-localized-plugin (#404) #754

build(deps): bump mkdocs-git-revision-date-localized-plugin (#404)

build(deps): bump mkdocs-git-revision-date-localized-plugin (#404) #754

name: Build documentation
on:
push:
branches:
- 'master'
- 'main'
- 'edge'
- 'beta'
- 'documentation/beta'
- 'software/beta'
- 'stable'
- 'documentation/stable'
- 'software/stable'
tags:
- 'documentation/v*'
pull_request:
merge_group:
workflow_dispatch:
inputs:
git-ref:
description: 'Git ref (optional)'
required: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Build documentation website
- name: Install poetry
run: pipx install poetry==1.7.1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'poetry'
cache-dependency-path: |
documentation/poetry.lock
- name: Install build dependencies
run: |
poetry -C ./documentation/ install
- name: Import external assets
run: poetry -C ./documentation/ run poe --root ./documentation/ import-external-assets
- name: Check documentation
run: poetry -C ./documentation/ run poe --root ./documentation/ check
- name: Build documentation
run: poetry -C ./documentation/ run poe --root ./documentation/ build
# Build and publish Docker container image
- name: Get Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/planktoscope/project-docs
tags: |
type=match,pattern=documentation/v(.*),group=1
type=edge,branch=master
type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') && github.ref != format('refs/heads/{0}', 'main') }}
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./documentation
pull: true
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'push tag' }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Upload documentation website as archive
- name: Upload website archive
uses: actions/upload-artifact@v4
with:
name: documentation-website
path: documentation/site
build-minimal:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
# Build minimal documentation website (without hardware setup guides, to save space)
- name: Install poetry
run: pipx install poetry==1.7.1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'poetry'
cache-dependency-path: |
documentation/poetry.lock
- name: Install build dependencies
run: |
poetry -C ./documentation/ install
- name: Import external assets
run: poetry -C ./documentation/ run poe --root ./documentation/ import-external-assets
- name: Make documentation minimal
run: poetry -C ./documentation/ run poe --root ./documentation/ make-minimal
- name: Check documentation
run: poetry -C ./documentation/ run poe --root ./documentation/ check
- name: Build documentation
run: poetry -C ./documentation/ run poe --root ./documentation/ build
# Build and publish Docker container image
- name: Get Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/planktoscope/project-docs
flavor: |
suffix=-minimal
tags: |
type=match,pattern=documentation/v(.*),group=1
type=edge,branch=master
type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') && github.ref != format('refs/heads/{0}', 'main') }}
type=ref,event=pr
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./documentation
pull: true
push: ${{ github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'push tag' }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Upload documentation website as archive
- name: Upload website archive
uses: actions/upload-artifact@v4
with:
name: documentation-website-minimal
path: documentation/site