Skip to content

Commit f40b3e7

Browse files
committed
Publish documentation.
1 parent 0be9965 commit f40b3e7

File tree

4 files changed

+65
-3
lines changed

4 files changed

+65
-3
lines changed

.github/workflows/documentation.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master # update to match your development branch (master, main, dev, trunk, ...)
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: write
14+
pull-requests: read
15+
statuses: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: julia-actions/setup-julia@v2
20+
with:
21+
version: '1.9'
22+
- uses: julia-actions/cache@v1
23+
- name: Install dependencies
24+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
25+
- name: Build and deploy
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
28+
run: julia --project=docs/ docs/make.jl

.github/workflows/ghpagescleanup.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
8+
concurrency:
9+
group: doc-preview-cleanup
10+
cancel-in-progress: false
11+
12+
jobs:
13+
doc-preview-cleanup:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout gh-pages branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: gh-pages
22+
- name: Delete preview and history + push changes
23+
run: |
24+
if [ -d "${preview_dir}" ]; then
25+
git config user.name "Documenter.jl"
26+
git config user.email "[email protected]"
27+
git rm -rf "${preview_dir}"
28+
git commit -m "delete preview"
29+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
30+
git push --force origin gh-pages-new:gh-pages
31+
fi
32+
env:
33+
preview_dir: previews/PR${{ github.event.number }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/Manifest.toml
2+
docs/build/

docs/make.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ makedocs(
4545
# Documenter can also automatically deploy documentation to gh-pages.
4646
# See "Hosting Documentation" and deploydocs() in the Documenter manual
4747
# for more information.
48-
#=deploydocs(
49-
repo = "<repository url>"
50-
)=#
48+
deploydocs(
49+
repo = "github.com/oliviermilla/Lucky.jl.git"
50+
)

0 commit comments

Comments
 (0)