snowflake/.forgejo/workflows/deployment/deploy-systems.yml
notohh f3c0db8c6a
All checks were successful
flake check / check (push) Successful in 3m20s
deploy systems / deploy (push) Successful in 14m59s
fmt check / check (push) Successful in 43s
ci: fix branch type
2023-11-05 11:14:14 -05:00

34 lines
999 B
YAML

name: deploy systems
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install nix action
uses: https://github.com/DeterminateSystems/nix-installer-action@v5
with:
github-token: ${{ secrets.GH_TOKEN }}
- name: write private key
run: |
mkdir -p .ssh && cd .ssh
echo "$SSH_KEY" > forgejo
chmod 400 forgejo
shell: bash
env:
SSH_KEY: ${{secrets.SSH_DEPLOY_KEY}}
- name: deploy
run: |
cd .ssh
nix run github:serokell/deploy-rs -- --ssh-opts="-i forgejo -o StrictHostKeyChecking=no" --skip-checks --targets .#arashi .#kariru .#sakura .#sora .#yuki
- name: garbage collect
uses: https://github.com/appleboy/ssh-action@v1.0.0
with:
host: 100.82.146.40
username: root
key: ${{secrets.SSH_DEPLOY_KEY}}
script: nh clean all