Refactoring of the Source Code Generator (#1141) #118
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: DocBuild | |
on: | |
push: | |
branches: master | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build_docs: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v2 | |
with: | |
path: main | |
- name: Get last commit message | |
run: | | |
cd main | |
echo "LAST_COMMIT=$(echo `git log -1 --pretty=%B`)" >> $GITHUB_ENV | |
cd .. | |
- name: Checkout gh-pages | |
uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: doc | |
- name: Install requirements | |
run: choco install docfx -y | |
- name: Build documentation | |
run: | | |
echo `pwd` | |
cd main | |
docfx docfx.json | |
cd ../doc | |
git config --global core.autocrlf false | |
git config --global user.email "[email protected]" | |
git config --global user.name "CI Build" | |
cp -r ../main/_site/* . | |
git add -A | |
if [ `git status -s | wc -l` = 0 ]; then | |
echo "No changes in built documentation, skipping" | |
exit 0 | |
fi | |
git commit -m "$LAST_COMMIT" -q | |
git push origin gh-pages -q |