File tree Expand file tree Collapse file tree 2 files changed +32
-36
lines changed
Expand file tree Collapse file tree 2 files changed +32
-36
lines changed Original file line number Diff line number Diff line change 1+ name : Documentation
2+
3+ permissions :
4+ contents : write
5+ pages : write
6+
7+ on :
8+ push :
9+ branches :
10+ - main
11+ schedule :
12+ - cron : ' 0 0 * * *'
13+ workflow_dispatch :
14+
15+ jobs :
16+ build-docs :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - uses : actions/checkout@v5
20+ - uses : julia-actions/setup-julia@v2
21+ with :
22+ version : ' 1'
23+
24+ - name : Install dependencies
25+ run : julia --project=docs/ -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
26+
27+ - name : Aggregate and deploy
28+ env :
29+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
30+ DOCUMENTER_KEY : ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
31+ run : julia --project=docs docs/make.jl
Original file line number Diff line number Diff line change @@ -67,39 +67,4 @@ MultiDocumenter.make(
6767 sitemap = true ,
6868)
6969
70- if " deploy" in ARGS
71- @warn " Deploying to GitHub" ARGS
72- gitroot = normpath(joinpath(@__DIR__, " .." ))
73- run(` git pull` )
74- outbranch = " gh-pages"
75- has_outbranch = true
76- if ! success(` git checkout $outbranch ` )
77- has_outbranch = false
78- if ! success(` git switch --orphan $outbranch ` )
79- @error " Cannot create new orphaned branch $outbranch ."
80- exit(1 )
81- end
82- end
83- for file in readdir(gitroot; join = true )
84- endswith(file, " .git" ) && continue
85- rm(file; force = true , recursive = true )
86- end
87- for file in readdir(outpath)
88- cp(joinpath(outpath, file), joinpath(gitroot, file))
89- end
90- run(` git add .` )
91- if success(` git commit -m 'Aggregate documentation'` )
92- @info " Pushing updated documentation."
93- if has_outbranch
94- run(` git push` )
95- else
96- run(` git push -u origin $outbranch ` )
97- end
98- run(` git checkout main` )
99- else
100- @info " No changes to aggregated documentation."
101- end
102- else
103- # @info "Skipping deployment, 'deploy' not passed. Generated files in docs/out." ARGS
104- # cp(outpath, joinpath(@__DIR__, "out"), force = true)
105- end
70+ Documenter. deploydocs(; repo = " github.com/QuantumKitHub/QuantumKitHubDocs.jl.git" , push_preview = true )
You can’t perform that action at this time.
0 commit comments