Fix CI path #9
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: GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| HUGO_CACHEDIR: /tmp/hugo_cache | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Setup Node.js (for PostCSS) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
| restore-keys: ${{ runner.os }}-npm- | |
| - name: Install npm dependencies (PostCSS etc.) | |
| working-directory: ./docs | |
| run: npm ci | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.147.9' | |
| extended: true | |
| - name: Cache Hugo modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.HUGO_CACHEDIR }} | |
| key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
| restore-keys: ${{ runner.os }}-hugomod- | |
| - name: Build Hugo site | |
| working-directory: ./docs | |
| run: hugo --minify | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs/public |