Add Scaleway Deployment Configuration (#1)
# Scaleway Deployment Setup This PR adds comprehensive deployment configuration for hosting the notebook site on Scaleway at `notebook.arnodo.fr`.
This commit was merged in pull request #1.
This commit is contained in:
46
.gitea/workflows/deploy.yml
Normal file
46
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Deploy to Scaleway
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: gitea-runner
|
||||
|
||||
container:
|
||||
image: scaleway/cli:latest
|
||||
|
||||
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: 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 }}
|
||||
Reference in New Issue
Block a user