2026-03-26 14:11:59 -07:00
|
|
|
name: Nightly
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
schedule:
|
|
|
|
|
- cron: '0 2 * * *'
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: self-hosted
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
2026-04-04 11:48:33 -07:00
|
|
|
with:
|
|
|
|
|
submodules: false
|
2026-03-26 14:11:59 -07:00
|
|
|
- name: Build
|
2026-04-04 11:48:33 -07:00
|
|
|
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"
|
2026-03-26 14:11:59 -07:00
|
|
|
- name: Upload artifact
|
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
|
with:
|
2026-04-04 11:48:33 -07:00
|
|
|
name: blog-${{ github.sha }}
|
|
|
|
|
path: book/
|
2026-03-26 14:11:59 -07:00
|
|
|
deploy:
|
|
|
|
|
needs: build
|
|
|
|
|
runs-on: self-hosted
|
|
|
|
|
steps:
|
|
|
|
|
- name: Download artifact
|
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
|
with:
|
2026-04-04 11:48:33 -07:00
|
|
|
submodules: true
|
|
|
|
|
token: ${{ secrets.WWW_PRIVATE_TOKEN }}
|
|
|
|
|
with:
|
|
|
|
|
name: blog-${{ github.sha }}
|
|
|
|
|
path: book/
|
2026-03-26 14:11:59 -07:00
|
|
|
- name: Deploy
|
2026-04-04 11:48:33 -07:00
|
|
|
run: |
|
2026-04-04 16:32:51 -07:00
|
|
|
nix shell nixpkgs#rsync --command rsync -av --delete --filter='protect assets/' book/ /srv/www/binning.net/
|
2026-04-04 11:48:33 -07:00
|
|
|
printf "✓ Local deployment complete!\n"
|