Skip to content

amendments to article #786

amendments to article

amendments to article #786

Workflow file for this run

name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.122.0'
extended: true
- name: Cache generated files
id: cache-gen
uses: actions/cache@v4
with:
path: resources
# A cache is currently immutable, so restore nearest cache each time.
key: hugo-resources-cache-${{ github.run_id }}
restore-keys: |
hugo-resources-cache
- name: Build
run: hugo --minify --gc --logLevel debug
- name: Upload built state
uses: actions/upload-artifact@v4
with:
name: site
path: public
retention-days: 2
lighthouse:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
sparse-checkout: |
lighthouserc.json
- name: Download compiled site
uses: actions/download-artifact@v4
with:
name: site
path: public
- name: Run Lighthouse analysis
uses: treosh/lighthouse-ci-action@v9
with:
configPath: "./lighthouserc.json"
uploadArtifacts: true
temporaryPublicStorage: true
runs: 1
deploy:
needs: build
runs-on: ubuntu-latest
if: success() && github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
steps:
- name: Download compiled site
uses: actions/download-artifact@v4
with:
name: site
path: public
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4