Files
infra-meraki/.gitea/workflows/deploy.yaml
Luke Tainton 36353780da
Some checks failed
Deploy / deploy (push) Failing after 42s
feat: add notifications for deployment success and failure
2026-03-13 20:37:58 +00:00

62 lines
1.7 KiB
YAML

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v6.0.2
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: uv cache
uses: actions/cache@v5
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install dependencies
run: uv sync
- name: Run Ansible
run: |
MERAKI_DASHBOARD_API_KEY=${{ secrets.MERAKI_DASHBOARD_API_KEY }} \
WIFI_PSK=${{ secrets.WIFI_PSK }} \
uv run ansible-playbook -i hosts config.yaml
- name: Minimize uv cache
run: uv cache prune --ci
- name: Notify Success
if: success()
uses: https://git.tainton.uk/actions/pushover-action@v1.1.4
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
title: "Meraki Configuration Deploy"
message: "Meraki configuration deployed successfully!"
sound: "classical"
- name: Notify Failure
if: failure()
uses: https://git.tainton.uk/actions/pushover-action@v1.1.4
env:
PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }}
PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }}
with:
title: "Meraki Configuration Deploy"
message: "Meraki configuration FAILED to deploy!"
sound: "mechanical"