mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 00:50:45 +01:00
Move dox build to GitHub actions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user