Physics tabulation notifier #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
push: | |
paths: | |
- '.github/workflows/document.yml' | |
- 'include/**' | |
jobs: | |
Documentation: | |
runs-on: ubuntu-latest | |
if: (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/dev') | |
steps: | |
- uses: actions/checkout@v2 | |
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- uses: actions/checkout@v2 | |
with: | |
repository: niess/pumas-docs | |
ref: ${{ github.ref }} | |
path: docs | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Install docurium | |
run: | | |
sudo apt-get remove -y libllvm8 | |
sudo apt-get install -y llvm-8 libclang-8-dev python-pygments | |
sudo gem install docurium | |
- uses: actions/checkout@v2 | |
with: | |
repository: niess/docurium | |
ref: 'new-style' | |
path: docs/docurium | |
- name: Build the docs | |
run: | | |
cd docs | |
git config user.email "action@github.com" | |
git config user.name "GitHub Action" | |
cd .. | |
LLVM_CONFIG=llvm-config-8 ./docs/update.sh | |
cd docs | |
git checkout HEAD~1 -- docs/docs/api/index.html docs/docs/api/js/docurium.js | |
git commit -a --amend --no-edit | |
cd .. | |
- name: Push the docs | |
uses: ad-m/github-push-action@master | |
with: | |
directory: docs | |
repository: niess/pumas-docs | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.PERSONAL_TOKEN }} | |
force: true | |