Skip to content

Commit fd281c1

Browse files
author
LuizFCDuarte
committed
🐛 Fix documentation branch ref
1 parent 32862b9 commit fd281c1

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

.github/workflows/doc_clean_up.yml

Lines changed: 33 additions & 0 deletions
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 }}
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
name: Documentation
22
on:
33
push:
4-
branches: [main]
4+
branches: ["master"]
55
tags: ['*']
66
pull_request:
77
types: [opened, synchronize, reopened]
88
jobs:
99
build:
10+
permissions:
11+
actions: write
12+
contents: write
13+
pull-requests: read
14+
statuses: write
1015
runs-on: ubuntu-latest
1116
steps:
12-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1318
- uses: julia-actions/setup-julia@latest
1419
with:
1520
# Build documentation on Julia 1.10
1621
version: '1.11'
22+
- uses: julia-actions/cache@v2
1723
- name: Install dependencies
1824
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
1925
- name: Build and deploy
2026
env:
2127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
2228
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with Documenter.jl
23-
run: julia --project=docs/ docs/make.jl
29+
run: julia --project=docs/ --code-coverage=user docs/make.jl
30+
- uses: julia-actions/julia-processcoverage@v1
31+
- uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)