-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexander Linne <[email protected]>
- Loading branch information
1 parent
3c839b4
commit 0e11a7b
Showing
1 changed file
with
47 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ on: | |
- "[0-9]+.[0-9]+.[0-9]+" | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
merge_group: | ||
types: [checks_requested] | ||
|
||
jobs: | ||
formatting: | ||
|
@@ -55,8 +57,51 @@ jobs: | |
dotnet-version: 8.0.303 | ||
- name: Run tests | ||
run: dotnet test -c Debug | ||
deploy: | ||
name: Deploy | ||
publish-docs: | ||
name: Publish documentation | ||
runs-on: ubuntu-latest | ||
needs: | ||
- formatting | ||
- coverage | ||
- run-tests | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup doxygen | ||
run: sudo apt-get install doxygen | ||
- name: Create temporary directory | ||
run: | | ||
tmpdir=$(mktemp -d -p "$RUNNER_TEMP") | ||
mkdir -p $tmpdir | ||
relative_path=$(realpath --relative-to="$GITHUB_WORKSPACE" "$tmpdir") | ||
echo "Created temporary directory $tmpdir ($relative_path relative to $GITHUB_WORKSPACE)" | ||
echo "DOCS_TEMP_DIR=$relative_path" >> "$GITHUB_ENV" | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
ref: gh-pages | ||
path: ${{ env.DOCS_TEMP_DIR }} | ||
- name: Generate documentation | ||
working-directory: ${{ env.DOCS_TEMP_DIR }} | ||
run: | | ||
find . -mindepth 1 -not -path './.git*' -delete | ||
doxygen "$GITHUB_WORKSPACE/documentation/Doxyfile" | ||
touch .nojekyll | ||
- name: Commit and push changes | ||
if: github.ref == 'refs/tags/[0-9]+.[0-9]+.[0-9]+' | ||
working-directory: ${{ env.DOCS_TEMP_DIR }} | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git add -A | ||
if [[ "$(git status --porcelain)" ]]; then | ||
git commit -m "Update documentation for $GITHUB_REF_NAME" | ||
git push | ||
else | ||
echo "No changes to commit" | ||
fi | ||
publish-packages: | ||
name: Publish packages | ||
if: github.ref == 'refs/tags/[0-9]+.[0-9]+.[0-9]+' | ||
runs-on: windows-latest | ||
environment: deploy | ||
|