Initial commit #1
Workflow file for this run
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: Deploy site to GitHub Pages | |
| # Adapted from https://gohugo.io/host-and-deploy/host-on-github-pages/ | |
| # Run when when a 'deploy/YYYY-MM-DD-rN' tag is pushed or when dispatched | |
| # manually. | |
| on: | |
| push: | |
| tags: | |
| - "deploy/20[2-9][0-9]-[01][0-9]-[0-3][0-9]-r[0-9]" | |
| workflow_dispatch: | |
| # Grant permissions to deploy to GitHub pages. | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Limit to one deployment at a time and always finish pending jobs. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| # Run commands using Bash. | |
| defaults: | |
| run: | |
| shell: bash | |
| # Generate, upload, and deploy site. | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DART_SASS_VERSION: 1.97.3 | |
| GO_VERSION: 1.25.6 | |
| HUGO_VERSION: 0.152.2 | |
| NODE_VERSION: 24.13.0 | |
| TZ: Europe/London | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| # # Uncomment if using Git submodules: | |
| # with: | |
| # submodules: recursive | |
| # fetch-depth: 0 | |
| # # Uncomment if using Go scripts: | |
| # - name: Set up Go | |
| # uses: actions/setup-go@v6 | |
| # with: | |
| # go-version: ${{ env.GO_VERSION }} | |
| # cache: false | |
| # # Uncomment if using Node.js packages: | |
| # - name: Set up Node.js | |
| # uses: actions/setup-node@v6 | |
| # with: | |
| # node-version: ${{ env.NODE_VERSION }} | |
| - name: Set up GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Create executable directory | |
| run: | | |
| mkdir -p "${HOME}/.local" | |
| # # Uncomment if using Dart Sass: | |
| # - name: Install Dart Sass | |
| # run: | | |
| # curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" | |
| # tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" | |
| # rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" | |
| # echo "${HOME}/.local/dart-sass" >> "${GITHUB_PATH}" | |
| - name: Install Hugo | |
| run: | | |
| curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" | |
| mkdir "${HOME}/.local/hugo" | |
| tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" | |
| rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" | |
| echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}" | |
| # Add the following commands if applicable: | |
| # echo "Dart Sass: $(sass --version)" | |
| # echo "Go: $(go version)" | |
| # echo "Node.js: $(node --version)" | |
| - name: Verify installation | |
| run: | | |
| echo "Hugo: $(hugo version)" | |
| # # Uncomment if using Node.js packages: | |
| # - name: Install Node.js packages | |
| # run: | | |
| # [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true | |
| - name: Configure Git | |
| run: | | |
| git config core.quotepath false | |
| - name: Generate site with Hugo | |
| run: | | |
| hugo \ | |
| --gc \ | |
| --minify \ | |
| --baseURL "${{ steps.pages.outputs.base_url }}/" | |
| - name: Upload generated site | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy uploaded site to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |