-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 971 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Scaleway builder/deployer
on:
push:
branches: [ "main" ]
jobs:
build_and_deploy:
name: Deploy Hugo Website
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.138.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_withdeploy_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build site
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: hugo --minify
- name: Deploy to scaleway
run: hugo deploy --force --maxDeletes -1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SCW_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SCW_SECRET_ACCESS_KEY }}