Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Deploy ModAPI Dlls & Update Documentation
on:
push:
branches:
- master
on: [push, pull_request]
jobs:
compile:
name: Compile ModAPI core DLLS
Expand Down Expand Up @@ -42,6 +39,7 @@ jobs:
name: Deploy ModAPI DLLs update
needs: compile
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download compiled files
uses: actions/download-artifact@v4
Expand All @@ -51,12 +49,6 @@ jobs:
- name: Create update bundle
run: zip SporeModAPIdlls.zip SporeModAPI.march2017.dll SporeModAPI.disk.dll SporeModAPI.combined.dll SporeModAPI.lib

# - name: Upload dlls bundle
# uses: actions/upload-artifact@v3.1.3
# with:
# name: compiled-modapi-dlls-bundle
# path: SporeModAPIdlls.zip

- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -89,6 +81,7 @@ jobs:
documentation:
name: Generate documentation
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1.2.0
Expand Down Expand Up @@ -126,12 +119,16 @@ jobs:
git init
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git remote add origin https://github.com/emd4600/Spore-ModAPI.git
git remote add origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git
git fetch
git symbolic-ref HEAD refs/remotes/origin/gh-pages
git reset
git add .
git commit -m "Documentation update $count"
# only commit when uncomitted changes are available
if [[ "$(git diff --name-only refs/remotes/origin/gh-pages | wc -l)" != "0" ]]
then
git add .
git commit -m "Documentation update $count"
fi

- name: Upload changes to GitHub
uses: ad-m/github-push-action@master
Expand Down