mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-11-26 12:25:08 +01:00
31 lines
904 B
YAML
31 lines
904 B
YAML
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
|
|
- cd docs
|
|
- gojekyll clean
|
|
- gojekyll build
|
|
- rm -rf /tmp/_site
|
|
- cp -a _site /tmp/
|
|
- cd ..
|
|
- git branch -D gh-pages || true
|
|
- git switch --orphan gh-pages
|
|
- git checkout gh-pages
|
|
- cp -a /tmp/_site/* .
|
|
- git add -A
|
|
- git commit -am 'Update'
|
|
- git push -f o gh-pages
|