MadelineProtoDocs/.woodpecker.yml

32 lines
900 B
YAML
Raw Normal View History

2024-05-01 14:53:46 +02:00
steps:
build:
image: danog/gojekyll
when:
branch: master
event: push
secrets:
- DEPLOY_KEY
commands:
- apt-get update && apt-get -y install openssh-client git
- mkdir -p $HOME/.ssh
- ssh-keyscan -t rsa github.com >> $HOME/.ssh/known_hosts
- echo "$DEPLOY_KEY" > $HOME/.ssh/id_rsa
- chmod 0600 $HOME/.ssh/id_rsa
- git config --global user.email "daniil@daniil.it"
- git config --global user.name "Daniil Gentili"
- git remote add o git@github.com:danog/MadelineProtoDocs.git
- git fetch o gh-pages
- cd docs
- gojekyll clean
- gojekyll build
- rm -rf /tmp/_site
- cp -a _site /tmp/
- cd ..
- git fetch o gh-pages
- git checkout gh-pages
- rm -rf *
- cp -a /tmp/_site/* .
- git add -A
- git commit -am 'Update'
- git push o gh-pages