Skip to content

Commit 0fafdf9

Browse files
committed
add build-docs GHA job
1 parent d9c6ea3 commit 0fafdf9

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,47 @@ jobs:
148148
with:
149149
version: latest
150150
args: release --snapshot --skip=publish --clean
151+
152+
build-docs:
153+
if: true # false to skip job during debug
154+
needs: [test-postgresql-ubuntu]
155+
name: Build Docs
156+
runs-on: ubuntu-latest
157+
steps:
158+
159+
- name: Check out code
160+
uses: actions/checkout@v5
161+
162+
- name: Configure Git
163+
run: |
164+
git config user.name "${GITHUB_ACTOR}"
165+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
166+
167+
- name: Set up Golang
168+
uses: actions/setup-go@v6
169+
with:
170+
go-version: '1.24'
171+
172+
- name: Set up gopages
173+
run: go install github.com/johnstarich/go/[email protected]
174+
175+
- name: Build Developer Docs
176+
run: gopages -out "docs/godoc" -base "/devel/godoc" -internal
177+
178+
- name: Set up Python
179+
uses: actions/setup-python@v6
180+
with:
181+
python-version: 3.12
182+
cache: 'pip'
183+
184+
- name: Install dependencies
185+
run: pip install mike mkdocs-material
186+
187+
- name: Check if we should push to gh-pages
188+
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
189+
run: |
190+
git fetch origin gh-pages --depth=1
191+
echo "push_opt=--push" >> $GITHUB_ENV
192+
193+
- name: Build mkdocs
194+
run: mike deploy ${{ env.push_opt }} devel

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ require (
2828
github.com/pkg/errors v0.9.1 // indirect
2929
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
3030
github.com/sagikazarmark/locafero v0.12.0 // indirect
31-
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
3231
github.com/spf13/afero v1.15.0 // indirect
3332
github.com/spf13/cast v1.10.0 // indirect
3433
github.com/spf13/pflag v1.0.10 // indirect

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnH
4545
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM=
4646
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
4747
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
48-
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
49-
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
5048
github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88eegjfxfHb4=
5149
github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI=
5250
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
5351
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
5452
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
5553
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
56-
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
57-
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
5854
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
5955
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
6056
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ nav:
6464
- Tutorials:
6565
- Installation: installation.md
6666
- Basic Jobs: basic_jobs.md
67+
- Migration: migration.md
6768
- Samples: samples.md
6869
- Reference:
6970
- API: api.md
7071
- Developer:
71-
- Migration: migration.md
72+
- License: license.md
73+
- Documentation: ../devel/godoc/index.html
7274

7375
extra:
7476
version:

0 commit comments

Comments
 (0)