Rename workflow from .yml to .yaml

This commit is contained in:
daudix
2024-02-18 17:26:10 +03:00
parent da3b5d5bc1
commit c109dc214f

47
.woodpecker.yaml Normal file
View File

@ -0,0 +1,47 @@
# Exclude page pipeline to be run on "pages" branch
when:
branch:
exclude: pages
# Recursive cloning is used to fully clone the themes given as Git submodules
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
steps:
# Build zola static files
build:
image: alpine
commands:
- apk add zola
- zola build
when:
event: [ pull_request, push ]
publish:
image: bitnami/git
# Must be set in Woodpecker configuration
secrets: [ mail, codeberg_token ]
commands:
# Save .domains
# - domains=$(cat .domains)
# 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 $CI_REPO_NAME
# Enter repository folder
- cd $CI_REPO_NAME
# Remove old files from repository folder
- git rm -r "*"
# Copy build step output to repository folder
- cp -ar ../public/. .
# Add .domains back
# - echo $domains > .domains
# Commit and push all static files with source commit SHA
- git add --all
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]"
- git push
when:
event: push