Skip to content

Deploy CI

Deploy CI #114

Workflow file for this run

name: Deploy CI
on:
schedule:
- cron: "0 1 * * *"
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Nix on da machine
uses: DeterminateSystems/nix-installer-action@main
- name: Build website
run: nix run nixpkgs#zola -- build --drafts
- name: Build manual for master
run: |
# Remove old result and build docs for given branch
rm -Rf result
nix build github:xinux-org/nix-darwin/$ND_RELEASE#manualHTML --no-write-lock-file
# Extract version from branch (it's master technically)
version="unstable"
# Create according location and deploy
mkdir -p ./public/manual/$version
cp -R ./result/share/doc/darwin/* ./public/manual/$version/
env:
ND_RELEASE: master
- name: Build manual for 24.11
run: |
rm -Rf result
nix build github:xinux-org/nix-darwin/$ND_RELEASE#manualHTML --no-write-lock-file
# Extract version from branch
input="$ND_RELEASE"
version="${input##*-}"
mkdir -p ./public/manual/$version
cp -R ./result/share/doc/darwin/* ./public/manual/$version
env:
ND_RELEASE: nix-darwin-24.11
- name: Link stable to latest version
run: |
cp -R ./public/manual/$LATEST ./public/manual/stable
env:
LATEST: 24.11
- name: Show the tree map
run: nix run nixpkgs#tree ./public
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./public"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4