|
| 1 | +name: "Documentation" |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 13 | + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }} |
| 14 | + |
| 15 | +jobs: |
| 16 | + docs: |
| 17 | + name: "Build Documentation" |
| 18 | + runs-on: [self-hosted, Linux, X64, gpu] |
| 19 | + timeout-minutes: 2000 |
| 20 | + env: |
| 21 | + DATADEPS_ALWAYS_ACCEPT: true |
| 22 | + JULIA_DEBUG: "Documenter" |
| 23 | + JULIA_PKG_SERVER: "" |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v6 |
| 26 | + - uses: julia-actions/setup-julia@v2 |
| 27 | + with: |
| 28 | + version: "1.11" |
| 29 | + - name: "Build Documentation" |
| 30 | + run: | |
| 31 | + git remote set-branches origin 'gh-pages' |
| 32 | + git fetch --depth=1 origin gh-pages |
| 33 | + julia --project -e ' |
| 34 | + println("--- Instantiating project") |
| 35 | + using Pkg |
| 36 | + Pkg.instantiate() |
| 37 | + Pkg.activate("docs") |
| 38 | + Pkg.instantiate() |
| 39 | + push!(LOAD_PATH, @__DIR__) |
| 40 | + println("+++ Building documentation") |
| 41 | + include("docs/make.jl")' |
| 42 | + env: |
| 43 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
| 45 | + |
| 46 | + aggregate: |
| 47 | + name: "Build and Deploy Aggregate Documentation" |
| 48 | + runs-on: [self-hosted, Linux, X64, large] |
| 49 | + timeout-minutes: 2000 |
| 50 | + env: |
| 51 | + JULIA_PKG_SERVER: "" |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v6 |
| 54 | + - uses: julia-actions/setup-julia@v2 |
| 55 | + with: |
| 56 | + version: "1.11" |
| 57 | + - name: "Build and Deploy" |
| 58 | + run: | |
| 59 | + julia --version |
| 60 | + julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' |
| 61 | + julia --project=docs/ docs/make_aggregate.jl |
| 62 | + aws s3 sync --delete --acl=public-read docs/build s3://docs.sciml.ai --cache-control max-age=600 |
| 63 | + env: |
| 64 | + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 65 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 66 | + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
0 commit comments