From 563dd295b9d52729dbb74cdab1e691b46bd6ad58 Mon Sep 17 00:00:00 2001 From: ADRN Date: Thu, 12 Sep 2024 10:48:17 +0200 Subject: [PATCH] woodpecker --- .woodpecker.yaml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .woodpecker.yaml diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..95201eb --- /dev/null +++ b/.woodpecker.yaml @@ -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 +