Site: honest offline copy, privacy engines, copy a11y (#247) #65
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 Website | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['web/**'] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| verify: | |
| name: Verify Website | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.165.0' | |
| extended: true | |
| - name: Build and test website | |
| working-directory: web | |
| run: npm run check | |
| - name: Validate rendered HTML | |
| working-directory: web | |
| run: npx --yes html-validate 'public/**/*.html' | |
| - name: Validate CSS | |
| working-directory: web | |
| run: npx --yes stylelint static/style.css | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.165.0' | |
| extended: true | |
| - name: Build Hugo site | |
| run: cd web && hugo --cleanDestinationDir --minify | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: web/public | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |