Update .gitea/workflows/deploy.yml #8

Merged
Damien merged 1 commits from update-ci into main 2025-11-19 15:40:10 +00:00
Showing only changes of commit 9351624142 - Show all commits

View File

@@ -8,6 +8,7 @@ on:
jobs: jobs:
build-and-deploy: build-and-deploy:
# On ne déploie que si la PR est mergée (et non juste fermée sans merge)
if: github.event.pull_request.merged == true if: github.event.pull_request.merged == true
runs-on: self-hosted runs-on: self-hosted
@@ -35,17 +36,22 @@ jobs:
curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh curl -s https://raw.githubusercontent.com/scaleway/scaleway-cli/master/scripts/get.sh | sh
scw version scw version
- name: Configure Scaleway CLI
run: |
scw init access-key=${{ secrets.SCW_ACCESS_KEY }} \
secret-key=${{ secrets.SCW_SECRET_KEY }} \
default-organization-id=${{ secrets.SCW_ORGANIZATION_ID }} \
default-region=fr-par
- name: Deploy to Object Storage - name: Deploy to Object Storage
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_DEFAULT_REGION: fr-par
SCW_DEFAULT_ZONE: fr-par-1
run: | run: |
# Copie récursive du dossier public vers le bucket S3
scw object cp public/ s3://notebook-arnodo-fr/ --recursive scw object cp public/ s3://notebook-arnodo-fr/ --recursive
- name: Purge CDN Cache (optional) - name: Purge CDN Cache
env:
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }}
SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }}
SCW_DEFAULT_REGION: fr-par
run: | run: |
scw edge-services pipeline purge pipeline-id=${{ secrets.SCW_PIPELINE_ID }} scw edge-services pipeline purge pipeline-id=${{ secrets.SCW_PIPELINE_ID }}