Stabilize lightbox identifiers #835
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
name: Publish site | |
on: | |
push: | |
branches: | |
- main | |
# limit to one concurrent run per PR/branch, | |
# and cancel any previous runs still going | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install pre-reqs | |
run: | | |
sudo apt-get install -y exiftool libfuse2 | |
mkdir "$HOME/bin" | |
wget -q 'https://imagemagick.org/archive/binaries/magick' -O "$HOME/bin/magick" | |
chmod +x "$HOME/bin/magick" | |
- uses: actions/cache@v4 | |
id: image-cache | |
with: | |
path: public/img | |
key: images-${{ hashFiles('src/**/*.png', 'src/**/*.jpe?g', 'src/**/*.gif', 'src/**/*.svg') }} | |
restore-keys: images- | |
- uses: actions/cache@v4 | |
id: build-cache | |
with: | |
path: build/target/release/wtp-build | |
key: build-${{ hashFiles('build/**') }} | |
- name: Build site | |
run: | | |
export PATH="$HOME/bin:$PATH" | |
# check if cache restored binary | |
if [ -e 'build/target/release/wtp-build' ]; then | |
./build.ps1 -skip_build | |
else | |
./build.ps1 | |
fi | |
- name: Validate HTML | |
run: | | |
wget -q 'https://github.com/validator/validator/releases/download/20.6.30/vnu.linux.zip' -O vnu.linux.zip | |
unzip -q vnu.linux.zip | |
vnu-runtime-image/bin/vnu --skip-non-html --filterfile .vnurc public || true # do not fail build | |
- name: Deploy to Neocities | |
uses: bcomnes/deploy-to-neocities@v3 | |
with: | |
api_key: ${{ secrets.NEOCITIES_API_TOKEN }} | |
cleanup: true | |
dist_dir: public | |
neocities_supporter: true |