2023-06-29 21:38:15 +02:00
|
|
|
name: Publish website to Codeberg Pages
|
|
|
|
run-name: publish-dgnum.eu
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- test-deploy
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
2023-06-30 00:17:41 +02:00
|
|
|
runs-on: native
|
2023-06-29 21:38:15 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: dgnum.eu
|
|
|
|
|
|
|
|
- name: Build website
|
|
|
|
run: |
|
2023-06-30 00:32:58 +02:00
|
|
|
# Hack to set the cache in the working directory
|
|
|
|
HOME="$GITHUB_WORKSPACE" nix-build dgnum.eu
|
2023-06-29 21:38:15 +02:00
|
|
|
|
2023-06-30 00:17:41 +02:00
|
|
|
- name: Clone dgnum.eu pages
|
2023-06-29 21:38:15 +02:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
env:
|
2023-06-30 00:32:58 +02:00
|
|
|
GITHUB_SERVER_URL: 'https://codeberg.org'
|
2023-06-29 21:38:15 +02:00
|
|
|
with:
|
|
|
|
repository: 'DGNum/pages'
|
|
|
|
path: pages
|
|
|
|
|
|
|
|
- name: Update assets
|
|
|
|
run: |
|
|
|
|
rm -r ../pages/*
|
|
|
|
cp -R --no-preserve=mode,ownership,timestamps result/* ../pages/
|
|
|
|
|
|
|
|
- name: Push new website
|
|
|
|
run: |
|
|
|
|
ls *
|
|
|
|
ls ../*
|