From fa3a07543ea88f1ec667b48daa0cdcadaa829f96 Mon Sep 17 00:00:00 2001 From: Suho Lee Date: Mon, 30 Oct 2023 15:13:12 +0900 Subject: [PATCH] Add workflow planetarium/libplanet/docs --- .github/workflows/docs.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000000..6e7e372b40f --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,51 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +on: + push: + branches-ignore: + - gh-pages + tags: + - "*" + schedule: + - cron: 59 14 * * * + pull_request: null +name: update docs + +jobs: + docs: + if: github.event_name != 'schedule' || github.repository == 'planetarium/libplanet' + name: docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + if: github.event_name != 'pull_request' + - uses: actions/checkout@main + if: github.event_name == 'pull_request' + with: + ref: ${{ github.pull_request.head.sha }} + - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + - run: dotnet build -p:SkipSonar=true + - run: mkdir -p Docs/obj/ + - run: Docs/build.ps1 + shell: pwsh + - uses: actions/upload-artifact@main + with: + name: docs + path: Docs/_site/ + - run: Docs/publish.sh + env: + GHPAGES_SSH_KEY: ${{ secrets.GHPAGES_SSH_KEY }} + if: github.event_name != 'pull_request' + - id: docs-url + run: 'echo ::set-output name=url::"$(cat Docs/obj/url.txt)"' + if: github.event_name != 'pull_request' + - uses: Sibz/github-status-action@v1.1.6 + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: docs + description: Libplanet docs generated by DocFX + state: 'success' + target_url: ${{ steps.docs-url.outputs.url }} + if: github.event_name != 'pull_request' \ No newline at end of file