Update .gitea/workflows/deploy.yml #9
@@ -8,7 +8,6 @@ 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
|
||||||
|
|
||||||
@@ -31,27 +30,23 @@ jobs:
|
|||||||
- name: Build Hugo site
|
- name: Build Hugo site
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
- name: Install Scaleway CLI
|
- name: Deploy to Object Storage (Hugo native)
|
||||||
|
run: |
|
||||||
|
hugo deploy --force --maxDeletes -1
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_KEY }}
|
||||||
|
AWS_REGION: fr-par
|
||||||
|
|
||||||
|
- name: Install Scaleway CLI (for Purge only)
|
||||||
run: |
|
run: |
|
||||||
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: Deploy to Object Storage
|
- name: Purge CDN Cache (optional)
|
||||||
env:
|
env:
|
||||||
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
|
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}
|
||||||
SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_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: |
|
|
||||||
# Copie récursive du dossier public vers le bucket S3
|
|
||||||
scw object cp public/ s3://notebook-arnodo-fr/ --recursive
|
|
||||||
|
|
||||||
- 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
|
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 }}
|
||||||
Reference in New Issue
Block a user