Jafner.net/.gitea/workflows/homelab_deploy-to-wizard.yml
Joey Hafner 97e4cc547a
Init Jafner.net monorepo from constituent repos:
1. homelab [Gitea](https://gitea.jafner.tools/Jafner/homelab), [Github (docker_config)](https://github.com/Jafner/docker_config), [Github (wiki)](https://github.com/Jafner/wiki), [Github (cloud_tools)](https://github.com/Jafner/cloud_tools), [Github (self-hosting)](https://github.com/Jafner/self-hosting).
   - Rename? Jafner.net? Wouldn't that be `Jafner/Jafner.net/Jafner.net`?
2. Jafner.dev [Github](https://github.com/Jafner/Jafner.dev).
3. dotfiles [Gitea](https://gitea.jafner.tools/Jafner/dotfiles), [Github](https://github.com/Jafner/dotfiles).
4. nvgm [Gitea](https://gitea.jafner.tools/Jafner/nvgm)
5. pamidi [Gitea](https://gitea.jafner.tools/Jafner/pamidi), [Github](https://github.com/Jafner/pamidi)
6. docker-llm-amd [Gitea](https://gitea.jafner.tools/Jafner/docker-llm-amd)
7. doradash [Gitea](https://gitea.jafner.tools/Jafner/doradash)
8. clip-it-and-ship-it [Gitea (PyClipIt)](https://gitea.jafner.tools/Jafner/PyClipIt), [Github](https://github.com/Jafner/clip-it-and-ship-it).
9. razer battery led [Github](https://github.com/Jafner/Razer-BatteryLevelRGB)
10. 5etools-docker [Github](https://github.com/Jafner/5etools-docker)
11. jafner-homebrew [Github](https://github.com/Jafner/jafner-homebrew)
2024-07-15 15:35:16 -07:00

57 lines
1.9 KiB
YAML

name: Deploy to Wizard
run-name: ${{ gitea.actor }} deploying
on:
push:
paths:
- '**/homelab/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
Notify:
runs-on: fighter
steps:
- name: Discord notification
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
args: '<@${{ secrets.DISCORD_ID_JAFNER }}> ${{ github.repository }} deploy to wizard: ${{ job.status }}'