fmt/.github/workflows/doc.yml

43 lines
1.5 KiB
YAML
Raw Normal View History

2020-11-04 00:48:01 +00:00
name: doc
on: [push, pull_request]
permissions:
contents: read
2020-11-04 00:48:01 +00:00
jobs:
build:
2021-06-03 15:43:41 +00:00
# Use Ubuntu 20.04 because doxygen 1.8.13 from Ubuntu 18.04 is broken.
2021-06-03 15:28:02 +00:00
runs-on: ubuntu-20.04
2020-11-04 00:48:01 +00:00
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
2020-11-04 00:48:01 +00:00
2024-06-09 23:51:19 +00:00
- name: Add Ubuntu mirrors
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 23:51:19 +00:00
- name: Create build environment
2020-11-04 00:48:01 +00:00
run: |
2021-06-26 13:29:53 +00:00
sudo apt update
2024-06-09 18:26:25 +00:00
sudo apt install doxygen
2024-06-09 23:54:53 +00:00
pip install mkdocs mkdocs-material mkdocstrings pymdown-extensions mike
2020-11-04 00:48:01 +00:00
cmake -E make_directory ${{runner.workspace}}/build
2024-06-10 00:07:23 +00:00
# Workaround https://github.com/actions/checkout/issues/13:
2024-06-10 00:04:19 +00:00
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
2024-06-10 00:07:23 +00:00
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
2020-11-04 00:48:01 +00:00
- name: Build
working-directory: ${{runner.workspace}}/build
2020-11-07 16:09:01 +00:00
env:
KEY: ${{secrets.KEY}}
2024-06-09 18:26:25 +00:00
run: |
2024-06-09 18:37:18 +00:00
cmake $GITHUB_WORKSPACE
2024-06-09 23:51:19 +00:00
$GITHUB_WORKSPACE/support/mkdocs deploy dev
2024-06-10 00:19:06 +00:00
cd $GITHUB_WORKSPACE/build/fmt.dev
2024-06-10 00:16:59 +00:00
git push https://$KEY@github.com/fmtlib/fmt.git