2024-10-10 23:38:31 +02:00
|
|
|
name: build site
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_site:
|
|
|
|
runs-on: nix
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build the site
|
|
|
|
run: nix-build
|
|
|
|
|
2024-10-10 23:57:44 +02:00
|
|
|
- name: Pushing site to pages branch
|
2024-10-10 23:51:10 +02:00
|
|
|
run: |
|
2024-10-10 23:58:41 +02:00
|
|
|
find . -mindepth 1 ! -name 'result' ! -name '.git' -exec rm -rf {} +
|
2024-10-10 23:52:53 +02:00
|
|
|
cp -r result/* .
|
2024-10-10 23:52:18 +02:00
|
|
|
rm result
|
2024-10-10 23:51:10 +02:00
|
|
|
git switch -C pages
|
2024-10-10 23:52:18 +02:00
|
|
|
git add *
|
2024-10-10 23:51:10 +02:00
|
|
|
|
2024-10-10 23:54:42 +02:00
|
|
|
git config user.name "DGNum Deploy"
|
2024-10-10 23:51:10 +02:00
|
|
|
git config user.email "tech@dgnum.eu"
|
|
|
|
|
2024-10-10 23:54:42 +02:00
|
|
|
git commit --message "Deploy site"
|
2024-10-10 23:51:10 +02:00
|
|
|
git push --set-upstream origin pages --force
|