name: Deploy on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Notify Start if: always() uses: https://git.tainton.uk/actions/pushover-action@v1.1.5 env: PUSHOVER_APP_TOKEN: ${{ secrets.PUSHOVER_APP_TOKEN }} PUSHOVER_USER_TOKEN: ${{ secrets.PUSHOVER_USER_TOKEN }} with: title: "Meraki Config Deploy Started" message: "Meraki configuration deployment has started." sound: "pushover" url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}" url_title: 'View Logs' - 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.5 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" url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}" url_title: 'View Logs' - name: Notify Failure if: failure() uses: https://git.tainton.uk/actions/pushover-action@v1.1.5 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" url: "${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}" url_title: 'View Logs'