Install Hugo and Deploy to Scaleway

- Added wget to install dependencies
- Changed the Hugo install process to use the deb package
- Changed the Hugo deploy command to use Scaleway
This commit is contained in:
darnodo
2025-11-19 20:19:47 +01:00
parent d2e177e9f8
commit 894e259c33

View File

@@ -19,7 +19,12 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
apt-get update apt-get update
apt-get install -y git curl ca-certificates apt-get install -y git curl ca-certificates wget
- name: Install Hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.152.2/hugo_extended_withdeploy_0.152.2_linux-amd64.deb -O /tmp/hugo.deb
dpkg -i /tmp/hugo.deb
- name: Checkout code - name: Checkout code
run: | run: |
@@ -27,19 +32,12 @@ jobs:
cd /tmp/workspace cd /tmp/workspace
git checkout ${{ github.sha }} git checkout ${{ github.sha }}
- name: Install Hugo
run: |
curl -L https://github.com/gohugoio/hugo/releases/download/v0.108.0/hugo_0.108.0_linux-amd64.tar.gz -o hugo.tar.gz
tar -xzf hugo.tar.gz
mv hugo /usr/local/bin/
hugo version
- name: Build site - name: Build site
run: hugo run: /usr/local/bin/hugo
working-directory: /tmp/workspace working-directory: /tmp/workspace
- name: Deploy to S3 - name: Deploy to Scaleway
run: hugo deploy --force --maxDeletes -1 run: /usr/local/bin/hugo deploy --force --maxDeletes -1
working-directory: /tmp/workspace working-directory: /tmp/workspace
env: env:
AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY }}