From c27496f23f52523d10a5c638daddf274e7ed1b43 Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Sat, 14 Dec 2024 13:45:50 +0800 Subject: [PATCH 1/4] ci: build doc with latest julia release --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ead4344..1a0c9ce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: - version: '1.9' + version: '1' - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 From 871382361fa7645c21f54dd6a6b3b63ff286c315 Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Wed, 1 Jan 2025 11:35:36 +0800 Subject: [PATCH 2/4] ci: give permissions for cache-action --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1a0c9ce..b70b886 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -34,6 +34,11 @@ jobs: docs: name: Documentation runs-on: ubuntu-latest + permissions: + # needed to allow julia-actions/cache to proactively delete old caches that it has created + actions: write + contents: write + statuses: write steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 From 9a3688a7a6a1b346de6f4667a7bb91c7ea09638e Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Wed, 1 Jan 2025 11:35:53 +0800 Subject: [PATCH 3/4] ci: build with latest commit --- .github/workflows/CI.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b70b886..d4c30d8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,6 +45,12 @@ jobs: with: version: '1' - uses: julia-actions/cache@v2 + - name: Configure doc environment + shell: julia --project=docs --color=yes {0} + run: | + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-docdeploy@v1 env: From f7c04799242f088cf514e65c2ec71e649a636769 Mon Sep 17 00:00:00 2001 From: Chengyu HAN Date: Wed, 1 Jan 2025 11:36:04 +0800 Subject: [PATCH 4/4] ci: run doctests --- .github/workflows/CI.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d4c30d8..fefe137 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -52,6 +52,13 @@ jobs: Pkg.develop(PackageSpec(path=pwd())) Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 + - name: Run doctests + shell: julia --project=docs --color=yes {0} + run: | + using Documenter: DocMeta, doctest + using Primes + DocMeta.setdocmeta!(Primes, :DocTestSetup, :(using Primes); recursive=true) + doctest(Primes) - uses: julia-actions/julia-docdeploy@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}