chore: Optimize CI
This commit is contained in:
@ -24,26 +24,19 @@ steps:
|
|||||||
image: bitnami/git
|
image: bitnami/git
|
||||||
# Must be set in Woodpecker configuration
|
# Must be set in Woodpecker configuration
|
||||||
secrets: [ mail, codeberg_token ]
|
secrets: [ mail, codeberg_token ]
|
||||||
environment:
|
|
||||||
- ZOLA_OUTPUT=public
|
|
||||||
commands:
|
commands:
|
||||||
# Git configuration
|
# Git configuration
|
||||||
- git config --global user.email $MAIL
|
- git config --global user.email $MAIL
|
||||||
- git config --global user.name "Woodpecker CI"
|
- git config --global user.name "Woodpecker CI"
|
||||||
- git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
- git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
||||||
# Remove old files from repository
|
# Enter repository folder
|
||||||
- ls # Debug
|
|
||||||
- cd $CI_REPO_NAME
|
- cd $CI_REPO_NAME
|
||||||
- ls # Debug
|
# Remove old files from repository folder
|
||||||
- git rm -r "*"
|
- git rm -r "*"
|
||||||
- ls # Debug
|
|
||||||
- cd ..
|
|
||||||
# Copy build step output to repository folder
|
# Copy build step output to repository folder
|
||||||
- cp -ar $ZOLA_OUTPUT/. $CI_REPO_NAME/
|
- cp -ar ../public/. $CI_REPO_NAME/
|
||||||
- ls # Debug
|
# Commit and push all static files with source commit SHA
|
||||||
# Commit and push all static files with pipeline started timestamp
|
- git add -A
|
||||||
- cd $CI_REPO_NAME
|
|
||||||
- git add .
|
|
||||||
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]"
|
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]"
|
||||||
- git push
|
- git push
|
||||||
when:
|
when:
|
||||||
|
Reference in New Issue
Block a user