TheAlgorithms-C/.github/workflows/gh-pages.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

2020-05-26 07:33:27 +08:00
name: Doxygen CI
on:
push:
branches: [master]
2020-05-26 07:33:27 +08:00
jobs:
build:
runs-on: ubuntu-latest
2020-05-26 08:20:04 +08:00
env:
BUILD_SHA: ${GITHUB_SHA}
2020-05-26 07:33:27 +08:00
steps:
- uses: actions/checkout@master
with:
submodules: true
2020-05-26 07:38:44 +08:00
- name: Install requirements
2020-05-26 07:43:33 +08:00
run: sudo apt -qq install doxygen graphviz ninja-build
2020-05-26 07:33:27 +08:00
- name: configure
run: cmake -G Ninja -B ./build -S .
- name: build
run: cmake --build build -t doc
- name: gh-pages
uses: actions/checkout@master
with:
ref: "gh-pages"
2020-05-26 08:00:42 +08:00
clean: false
2020-05-26 08:20:04 +08:00
- name: Move & Commit files
run: |
2020-05-26 09:07:17 +08:00
cp -rp ./build/html/* . && rm -rf ./build && rm -rf ./function_timer && ls -lah
2020-05-26 08:20:04 +08:00
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
2020-05-26 09:09:15 +08:00
git add *
2020-05-26 09:04:35 +08:00
git commit -m "Documentation for $BUILD_SHA" || true
2020-05-26 08:23:45 +08:00
git push --force || true