woodpecker
This commit is contained in:
parent
85bab778ea
commit
563dd295b9
1 changed files with 48 additions and 0 deletions
48
.woodpecker.yaml
Normal file
48
.woodpecker.yaml
Normal file
|
@ -0,0 +1,48 @@
|
|||
variables:
|
||||
- &NODE_VERSION 20.17.0
|
||||
- &GO_VERSION 1.22.3
|
||||
- &NODE_VERSION 20.17.0
|
||||
- &HUGO_ENV: production
|
||||
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:*NODE_VERSION
|
||||
environment:
|
||||
NODE_VERSION: *NODE_VERSION
|
||||
GO_VERSION: *GO_VERSION
|
||||
NODE_VERSION: *NODE_VERSION
|
||||
HUGO_ENV: *HUGO_ENV
|
||||
|
||||
commands:
|
||||
- echo "USING NODE ${NODE_VERSION}"
|
||||
- apt-get update && apt-get install -y curl
|
||||
- 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 install
|
||||
|
||||
- name: deploy
|
||||
when:
|
||||
event: [push]
|
||||
branch: hugoplate
|
||||
image: plugins/s3
|
||||
settings:
|
||||
bucket: chtinux
|
||||
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: /
|
||||
path_style: true
|
||||
|
Loading…
Reference in a new issue