31 lines
674 B
YAML
31 lines
674 B
YAML
name: Nightly
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * *'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build
|
|
run: nix shell nixpkgs#mdbook --command ./deploy.sh build
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: site-${{ github.sha }}
|
|
path: blog/
|
|
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: site-${{ github.sha }}
|
|
path: blog/
|
|
- name: Deploy
|
|
run: nix shell nixpkgs#rsync --command ./deploy.sh local
|