Skip to content

Commit

Permalink
docs: fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 7, 2024
1 parent 250574d commit 8858174
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Documentation
# Modelled from DiffEqDocs

on:
push:
Expand All @@ -18,10 +17,10 @@ jobs:
strategy:
matrix:
target:
- repo: "github.com/MilesCranmer/SymbolicRegression.jl.git"
key: "astroautomata"
- repo: "github.com/ai-damtp-cam-ac-uk/symbolicregression.git"
key: "cam"
- 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 @@ -35,14 +34,9 @@ jobs:
julia -e 'ENV["JULIA_PKG_SERVER"]=""; using Pkg; Pkg.update()'
- name: "Install dependencies"
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: "Set DOCUMENTER_KEY based on target"
run: |
if [ "${{ matrix.target.key }}" == "astroautomata" ]; then
echo "DOCUMENTER_KEY=${{ secrets.DOCUMENTER_KEY }}" >> $GITHUB_ENV
elif [ "${{ matrix.target.key }}" == "cam" ]; then
echo "DOCUMENTER_KEY=${{ secrets.DAMTP_DEPLOY_KEY }}" >> $GITHUB_ENV
fi
- name: "Build and deploy"
env:
TARGET_REPO: ${{ matrix.target.repo }}
run: julia --project=docs/ docs/make.jl
DOCUMENTER_KEY: ${{ matrix.target.name == 'astroautomata' && secrets.DOCUMENTER_KEY_ASTROAUTOMATA || secrets.DOCUMENTER_KEY_CAM }}
TARGET_REPO: ${{ matrix.target.repo_url }}
run: |
julia --project=docs/ docs/make.jl

0 comments on commit 8858174

Please sign in to comment.