Update workflow to trigger only on merged PR to main

This commit is contained in:
2025-11-19 12:53:36 +00:00
parent 03b64e2f7e
commit d31d9e8eb3

View File

@@ -1,12 +1,14 @@
name: Deploy to Scaleway name: Deploy to Scaleway
on: on:
push: pull_request:
types: [closed]
branches: branches:
- main - main
jobs: jobs:
build-and-deploy: build-and-deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -44,7 +46,3 @@ jobs:
- name: Deploy to Scaleway Object Storage - name: Deploy to Scaleway Object Storage
run: | run: |
s3cmd sync --delete-removed --acl-public public/ s3://${{ secrets.SCW_BUCKET_NAME }}/ s3cmd sync --delete-removed --acl-public public/ s3://${{ secrets.SCW_BUCKET_NAME }}/
- name: Invalidate cache (optional)
run: |
echo "If using Scaleway CDN, add cache invalidation here"