Skip to content

Commit 77166d8

Browse files
authored
CI: 拆分 PDF 构建流程、更新 CI (#138)
* CI: 拆分 PDF 构建流程 * CI: 在 pr 上运行 ci * CI: 更新操作版本 * CI: 添加 julia-actions/cache * CI: 跳过pr中间构建 * CI: 回退 julia 版本 * CI: 上传构建的 HTML
1 parent efb49a8 commit 77166d8

File tree

2 files changed

+48
-21
lines changed

2 files changed

+48
-21
lines changed

.github/workflows/docs.yml

+24-21
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,44 @@ on:
44
push:
55
branches:
66
- master
7+
pull_request:
78
workflow_dispatch:
89

10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: only if it is a pull request build.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
15+
916
jobs:
1017
HTML:
1118
runs-on: ubuntu-latest
19+
permissions:
20+
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
21+
contents: write
22+
statuses: write
1223
steps:
13-
- uses: actions/checkout@v3
14-
- uses: julia-actions/setup-julia@v1
24+
- uses: actions/checkout@v4
25+
- uses: julia-actions/setup-julia@v2
1526
with:
16-
version: "1.8"
27+
version: '1.8'
28+
show-versioninfo: true
29+
- uses: julia-actions/cache@v2
1730
- name: Install dependencies
31+
shell: julia --project=docs --color=yes {0}
1832
run: |
19-
julia --project=docs/ -e '
20-
using Pkg
21-
Pkg.develop(PackageSpec(path=pwd()))
22-
Pkg.instantiate()'
33+
using Pkg
34+
Pkg.develop(PackageSpec(path=pwd()))
35+
Pkg.instantiate()
2336
- name: Build and deploy
2437
env:
2538
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2639
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
2740
run: |
2841
julia -e 'include("contrib/build_sysimg.jl"); build_sysimg(force=true)'
2942
julia --project=doc/ doc/make.jl deploy
30-
PDF:
31-
runs-on: ubuntu-latest
32-
steps:
33-
- uses: actions/checkout@v2
34-
- name: Build and deploy
35-
timeout-minutes: 90
36-
uses: JuliaCN/[email protected]
37-
with:
38-
project_dir: 'doc'
39-
format: pdf # trigger the pdf compilation in our doc/make.jl
40-
- name: upload complied PDF file
41-
uses: actions/upload-artifact@v2
43+
- name: Upload HTML
44+
uses: actions/upload-artifact@v4
4245
with:
43-
name: compiled contents
44-
path: doc/build/*.pdf
46+
name: html-site
47+
path: doc/build/

.github/workflows/pdf.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
PDF:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Build and deploy
15+
timeout-minutes: 90
16+
uses: JuliaCN/[email protected]
17+
with:
18+
project_dir: 'doc'
19+
format: pdf # trigger the pdf compilation in our doc/make.jl
20+
- name: upload complied PDF file
21+
uses: actions/upload-artifact@v2
22+
with:
23+
name: compiled contents
24+
path: doc/build/*.pdf

0 commit comments

Comments
 (0)