Now the private content is stored as a git submodule. This means I can keep that repo's source private, but still use it in the build product. The build product (website) relies on HTTP basic authentication, so access control is maintained throughout the SDLC.
35 lines
815 B
YAML
35 lines
815 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 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:
|
|
name: blog-${{ github.sha }}
|
|
path: book/
|
|
- name: Deploy
|
|
run: |
|
|
nix shell nixpkgs#rsync --command rsync -av --delete book/ /srv/www/binning.net/
|
|
printf "✓ Local deployment complete!\n"
|