Joey Hafner
550baba73a
All checks were successful
Deploy to Wizard / Deploy (push) Successful in 29s
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Deploy to Wizard
|
|
run-name: ${{ gitea.actor }} deploying
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'wizard/**'
|
|
|
|
jobs:
|
|
Deploy:
|
|
runs-on: fighter
|
|
steps:
|
|
- name: Pull latest code onto host via SSH
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ vars.SSH_HOST_IP_WIZARD }} # this is a LAN IP
|
|
username: ${{ vars.SSH_USERNAME_WIZARD }}
|
|
key: ${{ secrets.SSH_KEY_DEPLOY_TO_WIZARD }}
|
|
script: |
|
|
cd ~/homelab
|
|
git pull
|
|
- name: Fix script permissions
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ vars.SSH_HOST_IP_WIZARD }} # this is a LAN IP
|
|
username: ${{ vars.SSH_USERNAME_WIZARD }}
|
|
key: ${{ secrets.SSH_KEY_DEPLOY_TO_WIZARD }}
|
|
script: |
|
|
chmod +x ~/homelab/wizard/config/*.sh
|
|
- name: Apply configuration
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ vars.SSH_HOST_IP_WIZARD }} # this is a LAN IP
|
|
username: ${{ vars.SSH_USERNAME_WIZARD }}
|
|
key: ${{ secrets.SSH_KEY_DEPLOY_TO_WIZARD }}
|
|
script: |
|
|
cd ~/homelab/wizard/config
|
|
/bin/vbash configure.sh
|
|
- name: Show configuration
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ vars.SSH_HOST_IP_WIZARD }} # this is a LAN IP
|
|
username: ${{ vars.SSH_USERNAME_WIZARD }}
|
|
key: ${{ secrets.SSH_KEY_DEPLOY_TO_WIZARD }}
|
|
script: |
|
|
cd ~/homelab/wizard/config
|
|
/bin/vbash show-config.sh |