Repository navigation
48 lines (44 loc) · 2.05 KB
/
Copy pathdocs.yml
File metadata and controls
48 lines (44 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Documentation
on:
push:
branches: [main]
tags: ['*']
workflow_dispatch:
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
env:
JULIA_VERSION: '1.12.6'
jobs:
docs:
name: Build and publish
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3
with:
version: ${{ env.JULIA_VERSION }}
- uses: julia-actions/cache@a45e8fa8be21c18a06b7177052533149e61e9b38 # v3
id: cache
- name: Build and publish documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOCALMATH_DEPLOY_DOCS: ${{ github.event_name == 'push' || github.ref == 'refs/heads/main' }}
run: |
mkdir -p "$RUNNER_TEMP/localmath-telemetry"
measure=(python3 .github/ci/measure.py --output "$RUNNER_TEMP/localmath-telemetry" --job documentation-publish)
"${measure[@]}" --phase cache-observation --annotation cache_hit=${{ steps.cache.outputs.cache-hit }} -- python3 -c 'pass'
"${measure[@]}" --phase instantiate -- env JULIA_PKG_PRECOMPILE_AUTO=0 julia --project=docs --startup-file=no -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
"${measure[@]}" --phase precompile -- julia --project=docs --startup-file=no -e 'using Pkg; Pkg.precompile()'
"${measure[@]}" --phase import -- julia --project=docs --startup-file=no -e 'using Documenter, LocalMath'
"${measure[@]}" --phase suite --log "$RUNNER_TEMP/localmath-telemetry/docs.log" -- julia --project=docs --startup-file=no -e 'include("docs/make.jl")'
- name: Upload documentation telemetry
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: telemetry-documentation-publish-${{ github.run_attempt }}
path: ${{ runner.temp }}/localmath-telemetry
if-no-files-found: error