2020-11-03 16:48:01 -08:00
|
|
|
name: doc
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
2022-05-30 00:58:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-03 16:48:01 -08:00
|
|
|
jobs:
|
|
|
|
build:
|
2021-06-03 08:43:41 -07:00
|
|
|
# Use Ubuntu 20.04 because doxygen 1.8.13 from Ubuntu 18.04 is broken.
|
2021-06-03 08:28:02 -07:00
|
|
|
runs-on: ubuntu-20.04
|
2020-11-03 16:48:01 -08:00
|
|
|
|
|
|
|
steps:
|
2024-06-02 06:22:27 -07:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
2020-11-03 16:48:01 -08:00
|
|
|
|
2024-06-09 16:51:19 -07:00
|
|
|
- name: Add Ubuntu mirrors
|
2023-02-12 20:46:50 +05:00
|
|
|
run: |
|
|
|
|
# Github Actions caching proxy is at times unreliable
|
|
|
|
# see https://github.com/actions/runner-images/issues/7048
|
|
|
|
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
|
|
|
|
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
|
|
|
|
sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list
|
|
|
|
|
2024-06-09 16:51:19 -07:00
|
|
|
- name: Create build environment
|
2020-11-03 16:48:01 -08:00
|
|
|
run: |
|
2021-06-26 06:29:53 -07:00
|
|
|
sudo apt update
|
2024-06-09 11:26:25 -07:00
|
|
|
sudo apt install doxygen
|
2024-06-23 07:27:58 -07:00
|
|
|
pip install mkdocs-material==9.5.25 mkdocstrings==0.25.1 mike==2.1.1
|
2020-11-03 16:48:01 -08:00
|
|
|
cmake -E make_directory ${{runner.workspace}}/build
|
2024-06-09 17:07:23 -07:00
|
|
|
# Workaround https://github.com/actions/checkout/issues/13:
|
2024-06-09 17:04:19 -07:00
|
|
|
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
|
2024-06-09 17:07:23 -07:00
|
|
|
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
|
2020-11-03 16:48:01 -08:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2024-06-11 13:43:31 -07:00
|
|
|
run: $GITHUB_WORKSPACE/support/mkdocs deploy dev
|
|
|
|
|
|
|
|
- name: Deploy
|
2020-11-07 08:09:01 -08:00
|
|
|
env:
|
2024-06-12 22:27:12 +05:00
|
|
|
KEY: "${{secrets.KEY}}"
|
2024-06-15 09:42:20 -07:00
|
|
|
if: env.KEY != '' && github.ref == 'refs/heads/master'
|
2024-06-11 15:31:05 -07:00
|
|
|
working-directory: ${{runner.workspace}}/fmt/build/fmt.dev
|
|
|
|
run: git push https://$KEY@github.com/fmtlib/fmt.dev.git
|