mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-09-09 11:54:55 -04:00
feat: minify minfied hugo pipeline (#16)
- fix: fatal: destination path '/tmp' already exists and is not an empty directory - fix: .domains should be copied to repo folder not to hugo output folder - feat: git commit message must not contain CI SKIP when pages branch is excluded from pipeline Co-authored-by: Peter Prumbach <mail@peterprumbach.de> Reviewed-on: https://codeberg.org/Codeberg-CI/examples/pulls/16 Co-authored-by: Peter Prumbach <ptpu@noreply.codeberg.org> Co-committed-by: Peter Prumbach <ptpu@noreply.codeberg.org>
This commit is contained in:
parent
286b834e75
commit
66cf7db148
@ -37,15 +37,18 @@ pipeline:
|
||||
# Git configuration
|
||||
- git config --global user.email $MAIL
|
||||
- git config --global user.name "Woodpecker CI"
|
||||
- git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git /tmp/$CI_REPO_NAME/
|
||||
- git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
||||
# Copy build step output to repository folder
|
||||
- cp -ar $HUGO_OUTPUT/. /tmp/$CI_REPO_NAME/
|
||||
- cp -ar $HUGO_OUTPUT/. $CI_REPO_NAME/
|
||||
# Needed for custom domains
|
||||
- cp .domains $HUGO_OUTPUT/ || true # Ignore if it doesn't exist
|
||||
- cp .domains $CI_REPO_NAME || true # Ignore if it doesn't exist
|
||||
# Commit and push all static files with pipeline started timestamp
|
||||
- cd /tmp/$CI_REPO_NAME/
|
||||
- cd $CI_REPO_NAME
|
||||
- git add .
|
||||
- git commit -m "Woodpecker CI ${CI_BUILD_CREATED} [CI SKIP]"
|
||||
- git commit -m "Woodpecker CI ${CI_BUILD_CREATED}"
|
||||
- git push
|
||||
when:
|
||||
event: push
|
||||
|
||||
branches:
|
||||
exclude: [ pages ]
|
Loading…
x
Reference in New Issue
Block a user