From 3e50b73d339f54e829b04f8f2d00a6edad01b308 Mon Sep 17 00:00:00 2001 From: Benjamin Bengfort Date: Mon, 25 Nov 2024 17:00:20 -0600 Subject: [PATCH] publish docs --- .github/workflows/docs.yaml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..0f579e9 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,40 @@ +name: Publish Docs +on: + push: + branches: + - main + +jobs: + publish: + name: Hugo + runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }}/go + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/github.com/rotationalio/honu/docs + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + path: ${{ env.GOPATH }}/src/github.com/rotationalio/honu + submodules: true + fetch-depth: 0 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.139.2' + extended: false + + - name: Build + run: hugo --gc --minify --templateMetrics --templateMetricsHints --verbose --verboseLog --buildDrafts --buildExpired --buildFuture --forceSyncStatic + + - name: Publish + if: github.event_name != 'pull_request' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_branch: gh-pages + publish_dir: ${{ env.GOPATH }}/src/github.com/rotationalio/honu/docs/public + cname: honudb.dev \ No newline at end of file