Remove the .domains copy step from CI
Zola can copy static files to the site root by itself
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
# Exclude page pipeline to be run on "pages" branch
|
||||
# Exclude the pipeline to run on the pages branch
|
||||
when:
|
||||
branch:
|
||||
exclude: pages
|
||||
|
||||
# Recursive cloning is used to fully clone the themes given as Git submodules
|
||||
# Clone recursively to fully clone the themes given as Git submodules
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
@ -11,7 +11,7 @@ clone:
|
||||
recursive: true
|
||||
|
||||
steps:
|
||||
# Build zola static files
|
||||
# Build Zola static files
|
||||
build:
|
||||
image: alpine:edge
|
||||
commands:
|
||||
@ -24,24 +24,24 @@ steps:
|
||||
publish:
|
||||
image: bitnami/git
|
||||
# Must be set in Woodpecker configuration
|
||||
# mail: Your email address used by Codebrg
|
||||
# codeberg_token: Codeberg access token with "write:repository" permission
|
||||
secrets: [mail, codeberg_token]
|
||||
commands:
|
||||
# Git configuration
|
||||
# Configure Git
|
||||
- git config --global user.email $MAIL
|
||||
- git config --global user.name "Woodpecker CI"
|
||||
# Clone output branch
|
||||
- git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
||||
# Enter output branch folder
|
||||
# Clone the output branch
|
||||
- git clone --branch pages https://$CODEBERG_TOKEN@codeberg.org/$CI_REPO.git $CI_REPO_NAME
|
||||
# Enter the output branch
|
||||
- cd $CI_REPO_NAME
|
||||
# Remove old files
|
||||
- git rm -r "*" || true # Ignore if it's empty
|
||||
# Copy build step output
|
||||
- git rm -r "*" || true # Don't fail if there's nothing to remove
|
||||
# Copy the output of the build step
|
||||
- cp -ar ../public/. .
|
||||
# Needed for custom domains
|
||||
- cp ../.domains . || true # Ignore if it doesn't exist
|
||||
# Commit and push all static files with source commit SHA
|
||||
# Commit and push all static files with the source commit hash
|
||||
- git add --all
|
||||
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" || true
|
||||
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
|
||||
- git push
|
||||
when:
|
||||
event: [push, manual]
|
||||
|
@ -1,3 +1,2 @@
|
||||
duckquill.daudix.one
|
||||
duckquill.daudix.codeberg.page
|
||||
pages.duckquill.daudix.codeberg.page
|
Reference in New Issue
Block a user