Skip to content

Commit b6c6915

Browse files
committed
back to deploydocs
1 parent 89b6c34 commit b6c6915

File tree

2 files changed

+43
-47
lines changed

2 files changed

+43
-47
lines changed

.github/workflows/Documentation.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ jobs:
1717
- uses: julia-actions/cache@v2
1818
- name: Install dependencies
1919
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
20-
- name: Aggregate and deploy
21-
run: |
22-
git config user.name github-actions
23-
git config user.email [email protected]
24-
julia --project=docs docs/make.jl --deploy --temp
20+
- uses: julia-actions/julia-docdeploy@v1
2521
env:
2622
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
2723
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/make.jl

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -264,46 +264,46 @@ Downloads.download(
264264
)
265265
@info "Final build done"
266266

267-
if "deploy" in ARGS
268-
@warn "Deploying to GitHub" ARGS
269-
gitroot = normpath(joinpath(@__DIR__, ".."))
270-
run(`git pull`)
271-
outbranch = "master"
272-
has_outbranch = true
273-
if !success(`git checkout $outbranch`)
274-
has_outbranch = false
275-
if !success(`git switch --orphan $outbranch`)
276-
@error "Cannot create new orphaned branch $outbranch."
277-
exit(1)
278-
end
279-
end
280-
for file in readdir(gitroot; join = true)
281-
endswith(file, ".git") && continue
282-
rm(file; force = true, recursive = true)
283-
end
284-
for file in readdir(outpath)
285-
cp(joinpath(outpath, file), joinpath(gitroot, file))
286-
end
287-
run(`git add .`)
288-
if success(`git commit -m 'Aggregate documentation'`)
289-
@info "Pushing updated documentation."
290-
if has_outbranch
291-
run(`git push`)
292-
else
293-
run(`git push -u origin $outbranch`)
294-
end
295-
run(`git checkout source`)
296-
else
297-
@info "No changes to aggregated documentation."
298-
end
299-
else
300-
@info "Skipping deployment, 'deploy' not passed. Generated files in docs/$(outpath)." ARGS
301-
cp(outpath, joinpath(@__DIR__, "build"), force = true)
302-
end
267+
#if "deploy" in ARGS
268+
# @warn "Deploying to GitHub" ARGS
269+
# gitroot = normpath(joinpath(@__DIR__, ".."))
270+
# run(`git pull`)
271+
# outbranch = "master"
272+
# has_outbranch = true
273+
# if !success(`git checkout $outbranch`)
274+
# has_outbranch = false
275+
# if !success(`git switch --orphan $outbranch`)
276+
# @error "Cannot create new orphaned branch $outbranch."
277+
# exit(1)
278+
# end
279+
# end
280+
# for file in readdir(gitroot; join = true)
281+
# endswith(file, ".git") && continue
282+
# rm(file; force = true, recursive = true)
283+
# end
284+
# for file in readdir(outpath)
285+
# cp(joinpath(outpath, file), joinpath(gitroot, file))
286+
# end
287+
# run(`git add .`)
288+
# if success(`git commit -m 'Aggregate documentation'`)
289+
# @info "Pushing updated documentation."
290+
# if has_outbranch
291+
# run(`git push`)
292+
# else
293+
# run(`git push -u origin $outbranch`)
294+
# end
295+
# run(`git checkout source`)
296+
# else
297+
# @info "No changes to aggregated documentation."
298+
# end
299+
#else
300+
# @info "Skipping deployment, 'deploy' not passed. Generated files in docs/$(outpath)." ARGS
301+
# cp(outpath, joinpath(@__DIR__, "build"), force = true)
302+
#end
303303

304-
#deploydocs(;
305-
# repo = "github.com/JuliaAstro/JuliaAstro.github.io",
306-
# push_preview = true,
307-
# branch = "master",
308-
# devbranch = "source"
309-
#)
304+
deploydocs(;
305+
repo = "github.com/JuliaAstro/JuliaAstro.github.io",
306+
push_preview = true,
307+
branch = "master",
308+
devbranch = "multidocumenter"
309+
)

0 commit comments

Comments
 (0)