parent
6ad823f787
commit
4c8503eba0
1 changed files with 7 additions and 29 deletions
|
@ -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
|
Loading…
Reference in a new issue