-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 1.01 KB
/
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
32
33
name: Scaleway builder/deployer
on:
push:
branches: [ "main" ]
jobs:
build_and_deploy:
name: Deploy Hugo Website
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.139.3
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_withdeploy_${HUGO_VERSION}_linux-amd64.tar.gz \
&& cd ${{ runner.temp }} \
&& tar -xvf hugo.tar.gz hugo \
&& sudo mv hugo /usr/local/bin/
- 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 }}