34 lines
959 B
YAML
34 lines
959 B
YAML
---
|
|
iname: Deploy Systems
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: nix
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- name: Validate Flake
|
|
run: nix flake check
|
|
|
|
- name: Build Systems
|
|
run: nix build .#nixosConfigurations --show-trace
|
|
|
|
- name: Deploy with deploy-rs
|
|
run: nix run .#deploy -- -- --confirm
|
|
env:
|
|
DEPLOY_SSH_USER: ${{ secrets.SSH_USER }}
|
|
DEPLOY_SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
- uses: https://git.sysctl.io/actions/gotify-action@master
|
|
if: always()
|
|
with:
|
|
gotify_api_base: ${{ secrets.GOTIFY_URL }}
|
|
gotify_app_token: ${{ secrets.GOTIFY_TOKEN }}
|
|
notification_title: |
|
|
[${{ github.repository }}] Deployment ${{ job.status }}
|
|
notification_message: |
|
|
Status: ${{ job.status }}
|
|
Commit: ${{ github.sha }}
|