Move dox build to GitHub actions

This commit is contained in:
Jordan Brown
2020-07-28 13:56:59 -04:00
parent e1634fadaf
commit 6af9a0b9ab
3 changed files with 44 additions and 66 deletions
+44
View File
@@ -66,6 +66,50 @@ jobs:
fi
exit $retval
dox-build:
name: Build Doxygen Site
runs-on: ubuntu-latest
env:
DOXDIR: ~/tgsdox
steps:
- name: Install Graphviz
run: apt-get install graphviz
- name: Checkout
uses: actions/checkout@v1
- name: Patch Doxyfile
run: |
VERSION=$(cat "build/Version.props" | grep -oPm1 "(?<=<TgsCoreVersion>)[^<]+")
echo -e "\nPROJECT_NUMBER = $VERSION\nINPUT = .\nOUTPUT_DIRECTORY = $DOXDIR\nPROJECT_LOGO = ./build/tgs.ico\nHAVE_DOT=YES" >> "docs/Doxyfile"
- name: Prep gh-pages Repository
if: github.event_name == 'push' && github.ref == 'dev'
run: |
git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" "$DOXDIR"
rm -r "$DOXDIR/*"
- name: Doxygen Build
uses: mattnotmitt/doxygen-action@v1
with:
doxyfile-path: 'docs/Doxyfile'
- name: gh-pages push
if: github.event_name == 'push' && github.ref == 'dev'
run: |
cd $DOXDIR
git config --global push.default simple
git config user.name "tgstation-server"
git config user.email "tgstation-server@tgstation13.org"
echo '# THIS BRANCH IS AUTO GENERATED BY GITHUB ACTIONS' > README.md
# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
echo "" > .nojekyll
git add --all
git commit -m "Deploy code docs to GitHub Pages for Travis build $TRAVIS_BUILD_NUMBER" -m "Commit: $TRAVIS_COMMIT"
git push -f "https://${{ secrets.GITHUB_TOKEN }}}@$GITHUB_URL" 2>&1 | /dev/null
docker-build:
name: Build Docker Image
runs-on: ubuntu-latest