Skip to content

Commit 9b6e6c9

Browse files
authored
ci: fix doc deploy (#561)
* ci: fix doc deploy * ci: allow Skip intermediate builds
1 parent c2eff3a commit 9b6e6c9

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 13 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 }}
@@ -48,23 +55,31 @@ jobs:
4855
docs:
4956
name: Documentation
5057
runs-on: ubuntu-latest
58+
permissions:
59+
# needed to allow julia-actions/cache to proactively delete old caches that it has created
60+
actions: write
61+
contents: write
5162
steps:
5263
- uses: actions/checkout@v4
5364
- uses: julia-actions/setup-julia@v1
5465
with:
5566
version: '1'
56-
- run: |
57-
julia --project=docs -e '
58-
using Pkg
59-
Pkg.develop(PackageSpec(path=pwd()))
60-
Pkg.instantiate()'
61-
- run: |
62-
julia --project=docs -e '
63-
using Documenter: doctest, DocMeta
64-
using Polynomials
65-
DocMeta.setdocmeta!(Polynomials, :DocTestSetup, :(using Polynomials); recursive = true)
66-
doctest(Polynomials)'
67-
- run: julia --project=docs docs/make.jl
67+
- uses: julia-actions/cache@v1
68+
- name: Configure doc environment
69+
shell: julia --project=docs --color=yes {0}
70+
run: |
71+
using Pkg
72+
Pkg.develop(PackageSpec(path=pwd()))
73+
Pkg.instantiate()
74+
- name: Run doctests
75+
shell: julia --project=docs --color=yes {0}
76+
run: |
77+
using Documenter: DocMeta, doctest
78+
using Polynomials
79+
DocMeta.setdocmeta!(Polynomials, :DocTestSetup, :(using Polynomials); recursive=true)
80+
doctest(Polynomials)
81+
- uses: julia-actions/julia-buildpkg@v1
82+
- name: Deploy
83+
run: julia --project=docs docs/make.jl
6884
env:
6985
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

0 commit comments

Comments
 (0)