Fix Woodpecker config (11)

This commit is contained in:
lostinlight 2022-01-22 13:22:38 +03:00
parent a1cf7d33e4
commit a78ea032e6

View file

@ -4,15 +4,16 @@ pipeline:
build: build:
image: node:12.22.1 image: node:12.22.1
commands: commands:
- npm install gulp -g - true
- npm install hexo-cli -g # - npm install gulp -g
- test -e package.json && npm install # - npm install hexo-cli -g
- gulp build --cwd ./themes/starter # - test -e package.json && npm install
- hexo generate # - gulp build --cwd ./themes/starter
- find -maxdepth 1 ! -name .git ! -name .domains ! -name public ! -name . -exec rm -rf {} \; # - hexo generate
# This only copies non-hidden files; those whose names start with period WOULD NOT be copied # - find -maxdepth 1 ! -name .git ! -name .domains ! -name public ! -name . -exec rm -rf {} \;
- mv public/* . # # This only copies non-hidden files; those whose names start with period WOULD NOT be copied
- rm -rf public # - mv public/* .
# - rm -rf public
when: when:
branch: branch:
include: [ main ] include: [ main ]
@ -24,11 +25,12 @@ pipeline:
commands: commands:
- apk add git openssh - apk add git openssh
# configure git # configure git
- git checkout -b pages # - git checkout -b pages
- git config --global user.email "nonexistent@example.com" # - git config --global user.email "nonexistent@example.com"
- git config --global user.name "Codeberg CI" # - git config --global user.name "Codeberg CI"
- git remote set-url origin https://"$${ACCESS_TOKEN}"@codeberg.org/fediverse/fediparty.git # - git remote set-url origin https://"$${ACCESS_TOKEN}"@codeberg.org/fediverse/fediparty.git
- git clone https://"$${ACCESS_TOKEN}"@codeberg.org/fediverse/fediparty.git pages
# deploy changes # deploy changes
- git add -A # - git add -A
- git commit -m "Woodpecker build ${CI_COMMIT_SHA}" # - git commit -m "Woodpecker build ${CI_COMMIT_SHA}"
- git push --force origin pages # - git push --force origin pages