Skip to content

Commit

Permalink
CI: 拆分 PDF 构建流程、更新 CI (#138)
Browse files Browse the repository at this point in the history
* CI: 拆分 PDF 构建流程

* CI: 在 pr 上运行 ci

* CI: 更新操作版本

* CI: 添加 julia-actions/cache

* CI: 跳过pr中间构建

* CI: 回退 julia 版本

* CI: 上传构建的 HTML
  • Loading branch information
inkydragon authored Oct 24, 2024
1 parent efb49a8 commit 77166d8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,44 @@ on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
HTML:
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: "1.8"
version: '1.8'
show-versioninfo: true
- uses: julia-actions/cache@v2
- name: Install dependencies
shell: julia --project=docs --color=yes {0}
run: |
julia --project=docs/ -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: |
julia -e 'include("contrib/build_sysimg.jl"); build_sysimg(force=true)'
julia --project=doc/ doc/make.jl deploy
PDF:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and deploy
timeout-minutes: 90
uses: JuliaCN/[email protected]
with:
project_dir: 'doc'
format: pdf # trigger the pdf compilation in our doc/make.jl
- name: upload complied PDF file
uses: actions/upload-artifact@v2
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: compiled contents
path: doc/build/*.pdf
name: html-site
path: doc/build/
24 changes: 24 additions & 0 deletions .github/workflows/pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Documentation

on:
push:
branches:
- master
workflow_dispatch:

jobs:
PDF:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and deploy
timeout-minutes: 90
uses: JuliaCN/[email protected]
with:
project_dir: 'doc'
format: pdf # trigger the pdf compilation in our doc/make.jl
- name: upload complied PDF file
uses: actions/upload-artifact@v2
with:
name: compiled contents
path: doc/build/*.pdf

0 comments on commit 77166d8

Please sign in to comment.