Images and media referenced by the private Copper Chronicle section are no longer tracked by git. They live at /assets/copper-chronicle/ on the server (/srv/www/binning.net/assets/) and are managed independently. Updated all image links in src/private/copper-chronicle to use absolute paths rooted at /assets/. Added --filter='protect assets/' to all deploy rsync commands to prevent accidental deletion during deploys.
35 lines
No EOL
1 KiB
YAML
35 lines
No EOL
1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: false
|
|
- name: Build
|
|
run: |
|
|
git config --global url."https://oauth2:${{ secrets.WWW_PRIVATE_TOKEN }}@forgejo.binning.net/".insteadOf "https://forgejo.binning.net/"
|
|
git submodule update --init --depth=1
|
|
nix shell nixpkgs#mdbook --command mdbook build
|
|
printf "✓ Build complete!\n"
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: blog-${{ github.sha }}
|
|
path: book/
|
|
deploy:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: blog-${{ github.sha }}
|
|
path: book/
|
|
- name: Deploy
|
|
run: |
|
|
nix shell nixpkgs#rsync --command rsync -av --delete --filter='protect assets/' book/ /srv/www/binning.net/
|
|
printf "✓ Local deployment complete!\n" |