Skip to content

Commit

Permalink
docs: combine deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 7, 2024
1 parent d4ef274 commit 46de2cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- name: "astroautomata"
repo_url: "github.com/MilesCranmer/SymbolicRegression.jl.git"
- name: "cam"
repo_url: "github.com/ai-damtp-cam-ac-uk/symbolicregression.git"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
Expand All @@ -36,7 +29,7 @@ jobs:
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: "Build and deploy"
env:
DOCUMENTER_KEY: ${{ matrix.target.name == 'astroautomata' && secrets.DOCUMENTER_KEY || secrets.DAMTP_DEPLOY_KEY }}
TARGET_REPO: ${{ matrix.target.repo_url }}
DOCUMENTER_KEY_ASTROAUTOMATA: ${{ secrets.DOCUMENTER_KEY }}
DOCUMENTER_KEY_CAM: ${{ secrets.DAMTP_DEPLOY_KEY }}
run: |
julia --project=docs/ docs/make.jl
7 changes: 6 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,10 @@ open("docs/build/losses/index.html", "w") do io
end

if !haskey(ENV, "JL_LIVERELOAD")
deploydocs(; repo=ENV["TARGET_REPO"])
ENV["DOCUMENTER_KEY"] = ENV["DOCUMENTER_KEY_ASTROAUTOMATA"]
deploydocs(; repo="github.com/MilesCranmer/SymbolicRegression.jl.git")

ENV["DOCUMENTER_KEY"] = ENV["DOCUMENTER_KEY_CAM"]
ENV["GITHUB_REPOSITORY"] = "ai-damtp-cam-ac-uk/symbolicregression.git"
deploydocs(; repo="github.com/ai-damtp-cam-ac-uk/symbolicregression.git")
end

0 comments on commit 46de2cb

Please sign in to comment.