From 11af123adf718eaf6b6dba55edc64757eba3d2d0 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Fri, 5 Jan 2024 18:17:02 +0100 Subject: [PATCH] Add deployment pipeline step --- .woodpecker.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index a86af52..9e7e808 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -6,11 +6,17 @@ steps: - npm install -D tailwindcss @tailwindcss/typography - npx tailwindcss -i input.css -o static/css/index.css --minify - zola build - # deploy: - # image: codeberg.org/xfix/plugin-codeberg-pages-deploy:1 - # settings: - # folder: public - # branch: pages - # ssh_key: - # from_secret: ssh_key - # git_config_name: "polynom.me CI system" \ No newline at end of file + - ls -l + deploy: + image: alpine:3.19 + secrets: [ git_push_token ] + commands: + - apk add --no-cache git + - git config --global user.email "ci@polynom.me" + - git config --global user.name "polynom.me CI system" + - git config --global --add safe.directory $CI_WORKSPACE/$CI_REPO_OWNER/$CI_REPO_NAME/deploy + - git init -b pages public + - cd public + - git add --all + - git commit -m "Deploy new version $CI_COMMIT_SHA" + - git push -u https://$GIT_PUSH_TOKEN@git.polynom.me/$CI_REPO_OWNER/$CI_REPO_NAME.git -f pages \ No newline at end of file