From b192e4c6ed0fc74fafa928640cc42cbc3416dd46 Mon Sep 17 00:00:00 2001 From: Aeddis Desauw Date: Mon, 6 Jan 2025 22:34:24 +0100 Subject: [PATCH] build: split workflow in two files --- .woodpecker/main.yaml | 29 ++++++++++++++++++++ .woodpecker.yaml => .woodpecker/preprod.yaml | 28 ++++++------------- 2 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 .woodpecker/main.yaml rename .woodpecker.yaml => .woodpecker/preprod.yaml (53%) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml new file mode 100644 index 0000000..bb15327 --- /dev/null +++ b/.woodpecker/main.yaml @@ -0,0 +1,29 @@ +when: + event: + - push + - pull_request + - manual + branch: + - main + +steps: + - name: build + image: alpine:3.17.2 + commands: + - apk update + - apk add zola + - zola build + + - name: upload + image: plugins/s3 + settings: + bucket: guide.deuxfleurs.fr + endpoint: https://garage.deuxfleurs.fr + region: garage + access_key: + from_secret: aws_access_key_id + secret_key: + from_secret: aws_secret_access_key + source: public/**/* + target: / + strip_prefix: public/ diff --git a/.woodpecker.yaml b/.woodpecker/preprod.yaml similarity index 53% rename from .woodpecker.yaml rename to .woodpecker/preprod.yaml index 67463b6..1b41c33 100644 --- a/.woodpecker.yaml +++ b/.woodpecker/preprod.yaml @@ -1,3 +1,11 @@ +when: + event: + - push + - pull_request + - manual + branch: + - preprod + steps: - name: build image: alpine:3.17.2 @@ -7,26 +15,6 @@ steps: - zola build - name: upload - when: - branch: - - main - image: plugins/s3 - settings: - bucket: guide.deuxfleurs.fr - endpoint: https://garage.deuxfleurs.fr - region: garage - access_key: - from_secret: aws_access_key_id - secret_key: - from_secret: aws_secret_access_key - source: public/**/* - target: / - strip_prefix: public/ - - - name: upload - when: - branch: - - preprod image: plugins/s3 settings: bucket: preprod-guide