Skip to content

Strip NUL bytes from cloned HTML to fix aggregate docs build #416

Strip NUL bytes from cloned HTML to fix aggregate docs build

Strip NUL bytes from cloned HTML to fix aggregate docs build #416

Workflow file for this run

name: "Documentation"
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }}
jobs:
docs:
name: "Build Documentation"
runs-on: [self-hosted, Linux, X64, gpu]
timeout-minutes: 2000
env:
DATADEPS_ALWAYS_ACCEPT: true
JULIA_DEBUG: "Documenter"
JULIA_PKG_SERVER: ""
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: "1.11"
- name: "Build Documentation"
run: |
git remote set-branches origin 'gh-pages'
git fetch --depth=1 origin gh-pages
julia --project -e '
println("--- Instantiating project")
using Pkg
Pkg.instantiate()
Pkg.activate("docs")
Pkg.instantiate()
push!(LOAD_PATH, @__DIR__)
println("+++ Building documentation")
include("docs/make.jl")'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
aggregate:
name: "Build and Deploy Aggregate Documentation"
runs-on: [self-hosted, Linux, X64, gpu]
timeout-minutes: 2000
env:
JULIA_PKG_SERVER: ""
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: "1.11"
- name: "Build Aggregate Documentation"
run: |
julia --version
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
julia --project=docs/ docs/make_aggregate.jl
env:
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- name: "Install AWS CLI"
if: github.event_name == 'push'
run: |
if ! command -v aws &> /dev/null && [ ! -x "$HOME/aws-cli/bin/aws" ]; then
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
./aws/install -i "$HOME/aws-cli" -b "$HOME/bin"
rm -rf awscliv2.zip aws
fi
export PATH="$HOME/bin:$PATH"
aws --version
- name: "Deploy to S3"
if: github.event_name == 'push'
run: |
export PATH="$HOME/bin:$PATH"
aws s3 sync --delete --acl=public-read docs/build s3://docs.sciml.ai --cache-control max-age=600
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}