Skip to content

Commit cef9619

Browse files
committed
CI: move docs job into separate workflow
1 parent a8518af commit cef9619

File tree

2 files changed

+48
-24
lines changed

2 files changed

+48
-24
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@ name: CI
22

33
# Trigger the workflow on push or pull request
44
on:
5-
- push
6-
- pull_request
5+
push:
6+
branches:
7+
- main
8+
- master
9+
pull_request:
10+
11+
# the `concurrency` settings ensure that not too many CI jobs run in parallel
12+
concurrency:
13+
# group by workflow and ref; the last slightly strange component ensures that for pull
14+
# requests, we limit to 1 concurrent job, but for the default repository branch we don't
15+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
16+
# Cancel intermediate builds, but only if it is a pull request build.
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
718

819
jobs:
920
# The CI test job
1021
test:
1122
name: ${{ matrix.gap-branch }}
1223
runs-on: ubuntu-latest
13-
# Don't run this twice on PRs for branches pushed to the same repository
14-
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
1524
strategy:
1625
fail-fast: false
1726
matrix:
@@ -39,23 +48,3 @@ jobs:
3948
- uses: codecov/codecov-action@v5
4049
with:
4150
token: ${{ secrets.CODECOV_TOKEN }}
42-
43-
# The documentation job
44-
manual:
45-
name: Build manuals
46-
runs-on: ubuntu-latest
47-
# Don't run this twice on PRs for branches pushed to the same repository
48-
if: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
49-
50-
steps:
51-
- uses: actions/checkout@v5
52-
- uses: gap-actions/setup-gap@v2
53-
- uses: gap-actions/build-pkg-docs@v1
54-
with:
55-
use-latex: 'true'
56-
- name: 'Upload documentation'
57-
uses: actions/upload-artifact@v4
58-
with:
59-
name: manual
60-
path: ./doc/manual.pdf
61-
if-no-files-found: error

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docs
2+
3+
# Trigger the workflow on push or pull request
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
pull_request:
10+
11+
# the `concurrency` settings ensure that not too many CI jobs run in parallel
12+
concurrency:
13+
# group by workflow and ref; the last slightly strange component ensures that for pull
14+
# requests, we limit to 1 concurrent job, but for the default repository branch we don't
15+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
16+
# Cancel intermediate builds, but only if it is a pull request build.
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
manual:
21+
name: Build manuals
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: gap-actions/setup-gap@v3
27+
- uses: gap-actions/build-pkg-docs@v2
28+
with:
29+
use-latex: 'true'
30+
- name: 'Upload documentation'
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: manual
34+
path: ./doc/manual.pdf
35+
if-no-files-found: error

0 commit comments

Comments
 (0)