New post: 'Data moats, stealthy AI, and more: AI Con 2024 notes' #245
This file contains 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
# Based on https://gohugo.io/hosting-and-deployment/hosting-on-github/ | |
name: GitHub pages | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # [email protected] | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Install Hugo | |
env: | |
HUGO_VERSION: 0.139.2 | |
run: | | |
wget -q -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Build production site | |
run: hugo --minify | |
- name: Commit changes to gh-pages branch (master only) | |
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # [email protected] | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
# The following steps aren't essential, but useful for debugging and viewing a human-friendly diff. | |
- name: Rebuild site without minification (master only) | |
if: github.ref == 'refs/heads/master' | |
run: hugo --destination ./public-unminified | |
- name: Commit changes to gh-pages-unminified branch (master only) | |
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # [email protected] | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages-unminified | |
publish_dir: ./public-unminified |