blog/.forgejo/workflows/nightly.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 34: mapping key "with" already defined at line 31
Matthew Binning ea89247704
All checks were successful
CI / build (push) Successful in 11s
CI / deploy (push) Successful in 5s
feat: Use assets outside of repo
2026-04-04 16:47:05 -07:00

40 lines
1.1 KiB
YAML

name: Nightly
on:
schedule:
- cron: '0 2 * * *'
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:
needs: build
runs-on: self-hosted
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
submodules: true
token: ${{ secrets.WWW_PRIVATE_TOKEN }}
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"