44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
---
|
|
|
|
steps:
|
|
- name: build
|
|
when:
|
|
event: [push]
|
|
image: node:20.17.0
|
|
commands:
|
|
- export GO_VERSION=1.22.3
|
|
- export HUGO_VERSION=0.134.2
|
|
- export HUGO_ENV=production
|
|
- apt-get update && apt-get install -y curl
|
|
- echo "https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_Linux-64bit.tar.gz"
|
|
- curl -LO "https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_Linux-64bit.tar.gz"
|
|
- tar -xvf hugo_extended_$${HUGO_VERSION}_Linux-64bit.tar.gz
|
|
- mv hugo /usr/local/bin/
|
|
- rm hugo_extended_$${HUGO_VERSION}_Linux-64bit.tar.gz
|
|
- echo "HUGO $${HUGO_VERSION} INSTALLED"
|
|
- curl -LO "https://dl.google.com/go/go$${GO_VERSION}.linux-amd64.tar.gz"
|
|
- tar -C /usr/local -xzf go$${GO_VERSION}.linux-amd64.tar.gz
|
|
- export PATH=$PATH:/usr/local/go/bin
|
|
- rm go$${GO_VERSION}.linux-amd64.tar.gz
|
|
- echo "GO $${GO_VERSION} INSTALLED"
|
|
- npm run project-setup
|
|
- npm install
|
|
- npm run build
|
|
|
|
- name: deploy
|
|
when:
|
|
event: [push]
|
|
branch: [main]
|
|
image: plugins/s3
|
|
settings:
|
|
bucket: chtinux.org
|
|
endpoint: https://garage.deuxfleurs.fr
|
|
region: garage
|
|
access_key:
|
|
from_secret: chtinux_aws_access_key_id
|
|
secret_key:
|
|
from_secret: chtinux_aws_secret_access_key
|
|
source: public/**/*
|
|
target: /
|
|
strip_prefix: public/
|
|
path_style: true
|