Skip to content

Commit f40f86a

Browse files
authored
ci: fix doc deploy (#419)
* ci: fix doc deploy * ci: Skip intermediate builds
1 parent 17cea1c commit f40f86a

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on:
77
branches:
88
- master
99
tags: '*'
10+
11+
concurrency:
12+
# Skip intermediate builds: always.
13+
# Cancel intermediate builds: only if it is a pull request build.
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
16+
1017
jobs:
1118
test:
1219
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -49,22 +56,31 @@ jobs:
4956
docs:
5057
name: Documentation
5158
runs-on: ubuntu-latest
59+
permissions:
60+
# needed to allow julia-actions/cache to proactively delete old caches that it has created
61+
actions: write
62+
contents: write
5263
steps:
5364
- uses: actions/checkout@v4
5465
- uses: julia-actions/setup-julia@v1
5566
with:
5667
version: '1'
57-
- run: |
58-
julia --project=docs -e '
59-
using Pkg
60-
Pkg.develop(PackageSpec(path=pwd()))
61-
Pkg.instantiate()'
62-
- run: |
63-
julia --project=docs -e '
64-
using Documenter: doctest
65-
using Roots
66-
doctest(Roots)'
67-
- run: julia --project=docs docs/make.jl
68+
- uses: julia-actions/cache@v1
69+
- name: Configure doc environment
70+
shell: julia --project=docs --color=yes {0}
71+
run: |
72+
using Pkg
73+
Pkg.develop(PackageSpec(path=pwd()))
74+
Pkg.instantiate()
75+
- name: Run doctests
76+
shell: julia --project=docs --color=yes {0}
77+
run: |
78+
using Documenter: DocMeta, doctest
79+
using Roots
80+
DocMeta.setdocmeta!(Roots, :DocTestSetup, :(using Roots); recursive=true)
81+
doctest(Roots)
82+
- uses: julia-actions/julia-buildpkg@v1
83+
- name: Deploy
84+
run: julia --project=docs docs/make.jl
6885
env:
6986
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

0 commit comments

Comments
 (0)