From 0e08ffe584b061083c332dcb0001f8e1effc79d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20K=2E=20Papp?= Date: Thu, 3 Oct 2024 12:40:30 +0200 Subject: [PATCH] build docs in separate action --- .github/workflows/CI.yml | 22 ---------------------- .github/workflows/documentation.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9601fc1..5c29b8a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,25 +46,3 @@ jobs: - uses: codecov/codecov-action@v1 with: file: lcov.info - docs: - name: Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 - with: - version: '1' - - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: | - julia --project=docs -e ' - using Documenter: doctest - using LogDensityProblems - doctest(LogDensityProblems)' - - run: julia --project=docs docs/make.jl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..f6a2f00 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,27 @@ +# see https://juliadocs.github.io/Documenter.jl/dev/man/hosting/#GitHub-Actions +# add this file to the repository once you set up authentication as described in the Documenter manual + +name: Documentation + +on: + push: + branches: + - master + tags: '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@latest + with: + version: '1.10' + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl