simplify #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Git Pull on Devices | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
pull-updates: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Connect to Tailscale | |
uses: tailscale/github-action@v2 | |
with: | |
authkey: ${{ secrets.TAILSCALE_AUTHKEY }} | |
- name: Pull from all devices | |
env: | |
DEVICES: gpu, jetson-orin, jetson-nano-mini | |
run: | | |
IFS=',' read -r -a devices <<< "$DEVICES" | |
for device in "${devices[@]}"; do | |
ssh -o StrictHostKeyChecking=no adnan@$device "cd /home/adnan/homelab_status_page && git stash && git pull origin main && git stash pop" | |
done |