28 lines
594 B
YAML
28 lines
594 B
YAML
name: Build & Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build image
|
|
run: |
|
|
docker build \
|
|
-t budget-commun:latest \
|
|
-f backend/Dockerfile .
|
|
|
|
- name: Redéployer sur TrueNAS
|
|
run: |
|
|
curl -sf -X POST http://172.16.11.1/api/v2.0/app/redeploy \
|
|
-H "Authorization: Bearer ${{ secrets.TRUENAS_API_KEY }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '"budget-commun"'
|