Merge pull request #2 from gtaylor/dependabot/npm_and_yarn/docs/postc… #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Hugo documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: docs/go.mod | |
| cache-dependency-path: docs/go.sum | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Set up Hugo | |
| uses: peaceiris/actions-hugo@v3.2.1 | |
| with: | |
| hugo-version: 0.164.0 | |
| extended: true | |
| - name: Install documentation dependencies | |
| run: npm ci | |
| working-directory: docs | |
| - name: Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build documentation | |
| run: hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/" | |
| working-directory: docs | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |