Skip to content

Deploy built docs

Deploy built docs #9

Workflow file for this run

---
name: "Build and deploy docs"
on: # yamllint disable-line rule:truthy
push:
tags: ["*"]
# FIXME: do not build docs on each PR or push
pull_request:
branches: ["*"]
workflow_dispatch:
permissions:
contents: read
id-token: write
pages: write
concurrency:
cancel-in-progress: false
group: "pages"
jobs:
build_docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: "Checkout git repository"
uses: actions/checkout@v4
- name: "DEBUG ME docker pull"
run: "docker pull ghcr.io/maximiliankolb/docs:1.0.0"
- name: "DEBUG ME docker tag"
run: "docker tag ghcr.io/maximiliankolb/docs:1.0.0 docs"
- name: "Check tree"
run: "tree"
- name: "Workaround to use podman in Makefile"
run: sed -i "s/podman/docker/g" Makefile
- name: "Workaround to use minimal container image"
run: sed -i "s/docs-minimal/docs/g" Makefile
- name: "Workaround to use non-interactive container in Makefile"
run: sed -i "s/-it//g" Makefile
- name: "Build docs"
run: make html
- name: "Check tree again"
run: "tree"
# - name: "Create archive"
# run: make archive
- name: "Rename built docs"
run: mv -f ./docs/output ./github-pages
- name: "Check tree another time"
run: "tree"
- name: "Setup Github Pages"
uses: actions/configure-pages@v5
- name: "Upload built docs"
uses: actions/upload-pages-artifact@v3
with:
path: "github-pages.tar.gz"
- name: "Deploy to GitHub Pages"
id: deployment
uses: actions/deploy-pages@v4
...