feat(docker): add webhook to auto-redeploy on master commit, remove old docker-related files
Build and deploy / deploy (push) Successful in 35s
Build and deploy / deploy (push) Successful in 35s
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: Build and deploy
|
||||
run-name: ${{ gitea.actor }} is deploying Le Tribunal
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm run build
|
||||
cp -r .next/static .next/standalone/.next/static
|
||||
cp -r public .next/standalone/public
|
||||
env:
|
||||
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
|
||||
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
tar -czf - -C .next/standalone . | \
|
||||
curl -sf \
|
||||
-H "X-Webhook-Secret: ${{ secrets.WEBHOOK_SECRET }}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @- \
|
||||
"${{ secrets.DEPLOY_WEBHOOK }}"
|
||||
Reference in New Issue
Block a user