Skip to content

Commit

Permalink
github: add docs workflow, touch-up
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlettman committed Jul 16, 2024
1 parent a3a27e1 commit 2bf45f9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go-version }}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
branches: [main, devel]
pull_request:
branches: [main]
paths-ignore:
- "**/*.md"
- "**/*.py"
- "LICENSE"

jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build documentation
run: |
go install go.abhg.dev/doc2go@latest
doc2go -out docs ./...
- name: Deploy documentation to GitHub pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: docs
- name: Upload documentation
uses: actions/upload-artifact@v1
with:
name: documentation
path: docs
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ samples/
### Documentation
# Generated docs
docs/
doc/

### JetBrains
# User-specific stuff
Expand Down

0 comments on commit 2bf45f9

Please sign in to comment.