From aef50067aee828f1c267fcd7cfaa6d88a7cedd6e Mon Sep 17 00:00:00 2001 From: Arne Kiesewetter Date: Wed, 4 Dec 2024 00:55:28 +0100 Subject: [PATCH] Update CI --- .github/workflows/docfx.yml | 52 +++++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 6 ++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/docfx.yml diff --git a/.github/workflows/docfx.yml b/.github/workflows/docfx.yml new file mode 100644 index 0000000..ff0f6f6 --- /dev/null +++ b/.github/workflows/docfx.yml @@ -0,0 +1,52 @@ +name: docfx Deployment + +# Trigger the action on push to master +on: + push: + branches: + - master + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + actions: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + publish-docs: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Dotnet Setup + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.x + source-url: https://nuget.pkg.github.com/ResoniteModdingGroup/index.json + env: + NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Add MonkeyLoader NuGet source + run: dotnet nuget add source https://pkg.munally.com/MonkeyModdingTroop/index.json + + - run: dotnet tool update -g docfx + - run: docfx ./docfx.json + + - name: Upload Pages Artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './Docs/_site' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 03c1bf1..660ca98 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,6 +22,12 @@ env: defaults: run: shell: pwsh + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "ci" + cancel-in-progress: true jobs: Build: