mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Doxygen CI
|
|
|
|
on: [push]
|
|
# push:
|
|
# branches: [ master ]
|
|
# pull_request:
|
|
# branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
BUILD_SHA: ${GITHUB_SHA}
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
submodules: true
|
|
- name: Install requirements
|
|
run: sudo apt -qq install doxygen graphviz ninja-build
|
|
- 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"
|
|
clean: false
|
|
- name: Move & Commit files
|
|
run: |
|
|
mv ./build/html/*.* . && rm -rf ./build && rm-rf function_timer && ls -lah
|
|
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
|
|
git add *.*
|
|
git commit -am "Documentation for ${BUILD_SHA}" || true
|
|
git push --force origin HEAD:$GITHUB_REF || true
|