diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8e3c837..931d9fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..cf21fed --- /dev/null +++ b/.github/workflows/docs.yaml @@ -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/actions-gh-pages@v2.3.1 + 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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index d258bac..8c0493d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ samples/ ### Documentation # Generated docs docs/ -doc/ ### JetBrains # User-specific stuff