Files
Notebook/.gitea/workflows/deploy.yml
Damien Arnodo 7431e861be
Some checks failed
Deploy to Scaleway / build-and-deploy (pull_request) Failing after 1m11s
Update .gitea/workflows/deploy.yml
2025-11-19 15:24:17 +00:00

51 lines
1.3 KiB
YAML

name: Deploy to Scaleway
on:
pull_request:
types: [closed]
branches:
- main
jobs:
build-and-deploy:
if: github.event.pull_request.merged == true
runs-on: self-hosted
container:
image: node:20-bullseye
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build Hugo site
run: hugo --minify
- name: Install Scaleway CLI
run: |
curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.32.0/scaleway-cli_2.32.0_linux_amd64"
chmod +x /usr/local/bin/scw
- 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
run: |
scw object cp public/ s3://notebook-arnodo-fr/ --recursive
- name: Purge CDN Cache (optional)
run: |
scw edge-services pipeline purge pipeline-id=${{ secrets.SCW_PIPELINE_ID }}