Files
Notebook/.gitea/workflows/deploy.yml

51 lines
1.2 KiB
YAML

name: Deploy to Scaleway
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-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: Install s3cmd
run: |
sudo apt-get update
sudo apt-get install -y s3cmd
- name: Configure s3cmd for Scaleway
run: |
cat > ~/.s3cfg << EOF
[default]
access_key = ${{ secrets.SCW_ACCESS_KEY }}
secret_key = ${{ secrets.SCW_SECRET_KEY }}
host_base = s3.fr-par.scw.cloud
host_bucket = %(bucket)s.s3.fr-par.scw.cloud
use_https = True
EOF
- name: Deploy to Scaleway Object Storage
run: |
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"