From 4c8503eba07ae15f0ce743221c76e58d0dd3159f Mon Sep 17 00:00:00 2001 From: lauralani Date: Tue, 8 Aug 2023 09:27:53 +0200 Subject: [PATCH] update CI --- .woodpecker/deploy.yml | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index 73dab7c..88d7509 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -27,11 +27,13 @@ steps: # Build hugo static files build: image: golang:1.20-bookworm - commands: - - wget https://github.com/gohugoio/hugo/releases/download/v0.116.0/hugo_extended_0.116.0_linux-amd64.deb && apt install ./hugo_extended_0.116.0_linux-amd64.deb && rm -f hugo_extended_0.116.0_linux-amd64.deb - - hugo --minify --destination ./hugo_public + environment: + - HUGO_VERSION=0.117.0 when: - event: [ pull_request, push ] + event: push + commands: + - wget https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && apt install ./hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && rm -f hugo_extended_$${HUGO_VERSION}_linux-amd64.deb + - hugo --minify --destination ./public netlify-deploy: @@ -43,28 +45,4 @@ steps: - NETLIFY_SITE_ID commands: - npm install netlify-cli -g - - netlify deploy --prod --dir ./hugo_public - -# publish: -# image: bitnami/git -# # Must be set in Woodpecker configuration -# secrets: -# - codeberg_token -# environment: -# DEST_REPONAME: dest_repo -# commands: -# # Git configuration -# - git config --global user.email noreply@example.com -# - git config --global user.name "Woodpecker CI" -# - git clone https://$CODEBERG_TOKEN@codeberg.org/lila-network/pages.git $DEST_REPONAME -# # Copy build step output to repository folder -# - cp -ar ./hugo_public/. $DEST_REPONAME/ -# # Needed for custom domains -# - cp .domains $DEST_REPONAME || true # Ignore if it doesn't exist -# # Commit and push all static files with pipeline started timestamp -# - cd $DEST_REPONAME -# - git add . -# - git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" -# - git push -# when: -# event: push + - netlify deploy --prod --dir ./hugo_public \ No newline at end of file