Joey Hafner
6b4acee68c
All checks were successful
Deploy to Fighter / Deploy-to-Fighter (push) Successful in 3s
31 lines
998 B
YAML
31 lines
998 B
YAML
name: Deploy to Fighter
|
|
run-name: ${{ gitea.actor }} deploying
|
|
on: [push]
|
|
|
|
jobs:
|
|
Deploy-to-Fighter:
|
|
runs-on: internal
|
|
steps:
|
|
- name: Pull latest code onto Fighter via SSH
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ vars.SSH_HOST_IP_FIGHTER }} # this is a LAN IP
|
|
username: ${{ vars.SSH_USERNAME_FIGHTER }}
|
|
key: ${{ secrets.SSH_KEY_DEPLOY_TO_FIGHTER }}
|
|
script: |
|
|
cd ~/homelab
|
|
git pull
|
|
- name: Validate compose configs
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ vars.SSH_HOST_IP_FIGHTER }} # this is a LAN IP
|
|
username: ${{ vars.SSH_USERNAME_FIGHTER }}
|
|
key: ${{ secrets.SSH_KEY_DEPLOY_TO_FIGHTER }}
|
|
script: |
|
|
for stack in /home/$USER/homelab/fighter/config/*
|
|
do cd $stack &&
|
|
echo "===== Validating $(basename $PWD) =====" &&
|
|
docker compose config > /dev/null
|
|
done
|
|
|