blog/.gitea/workflows/build.yaml

42 lines
1.1 KiB
YAML
Raw Normal View History

2023-08-12 15:00:51 +01:00
name: build and publish
on: push
env:
DEV_SHELL_NAME: CI
jobs:
2023-08-12 18:56:26 +01:00
Publish:
2023-08-12 15:00:51 +01:00
runs-on: flakes-action
steps:
2023-08-12 15:04:48 +01:00
- uses: actions/checkout@v3
name: Checkout
2023-08-12 18:56:26 +01:00
- name: Build
2023-08-12 18:40:03 +01:00
run: |
nix develop -c hugo --gc --minify
2023-08-12 18:56:26 +01:00
- name: Publish
2023-08-12 18:40:03 +01:00
run: |
2023-08-12 18:56:26 +01:00
mkdir -p ~/.ssh/
cat >> ~/.ssh/id_ed25519 << EOF
${{ secrets.MB1_SSH_UPLOAD_KEY }}
EOF
chmod 400 ~/.ssh/id_ed25519
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILqDeXcIQwLXxuueu9KTC6y6NPUUzDRdF4Q5NUk+nFwt upload@blog" > ~/.ssh/id_ed25519.pub
nix develop -c rsync -avz -e 'ssh -o StrictHostKeyChecking=accept-new' public/ blog@blog.cyplo.net:/var/www/blog/
- name: Check html
run: |
nix develop -c htmltest
Check config:
runs-on: flakes-action
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Metadata
run: |
nix flake metadata
- name: Statix
run: |
nix develop -c statix check
- name: Flake check
run: |
nix flake check