ci: switch builds.sr.ht manifest to forgejo actions workflow
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
b0ee6d8970
commit
6c45c15c5f
20
.build.yml
20
.build.yml
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
image: nixos/unstable
|
||||
environment:
|
||||
NIX_CONFIG: 'experimental-features = nix-command flakes'
|
||||
sources:
|
||||
- https://git.sr.ht/~c8h4/c8h4.io
|
||||
secrets:
|
||||
- 8e01c227-f772-4dec-b1f5-f21657b709a0
|
||||
tasks:
|
||||
- lint: |
|
||||
cd c8h4.io
|
||||
nix flake check
|
||||
- build: |
|
||||
cd c8h4.io
|
||||
nix build
|
||||
- deploy: |
|
||||
echo 'fort.c8h4.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFFOE4T7/1+13rqroj6xB6UI8l11OqvWbcE5NFvhY7v+' >~/.ssh/known_hosts
|
||||
tar -C c8h4.io/result -cvzf site.tar.gz .
|
||||
set +x # do not completely clobber the output with gargabe
|
||||
cat <(echo c8h4.io) <(cat site.tar.gz) | ssh -T deploy@fort.c8h4.io
|
34
.forgejo/workflows/main.yaml
Normal file
34
.forgejo/workflows/main.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
NIX_CONFIG: 'experimental-features = nix-command flakes'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: nixos-unstable
|
||||
steps:
|
||||
- name: prepare nix container
|
||||
run: nix-env -iA nixpkgs.nodejs
|
||||
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: check
|
||||
run: nix flake check -L
|
||||
|
||||
- name: build
|
||||
run: nix build
|
||||
|
||||
- name: deploy
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.deploy_sshkey }}
|
||||
TARGET_HOST: ${{ vars.TARGET_HOST }}
|
||||
run: |
|
||||
cat <(echo c8h4.io) <(tar -C result/ -cvz .) \
|
||||
| ssh -i <(echo "$SSH_KEY") -T deploy@$TARGET_HOST
|
Loading…
Reference in a new issue