update CIs
This commit is contained in:
parent
5fdbce0fb2
commit
71828bc64d
2 changed files with 26 additions and 3 deletions
24
.woodpecker/deploy-rsync.yaml
Normal file
24
.woodpecker/deploy-rsync.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
steps:
|
||||||
|
build:
|
||||||
|
image: python:3
|
||||||
|
commands:
|
||||||
|
- pip3 install -r requirements.txt
|
||||||
|
- mkdocs build --site-dir publish
|
||||||
|
|
||||||
|
upload:
|
||||||
|
image: alpine:latest
|
||||||
|
secrets:
|
||||||
|
- RSYNC_SSHKEY
|
||||||
|
- RSYNC_TARGET_SERVER
|
||||||
|
- RSYNC_TARGET_USER
|
||||||
|
- RSYNC_TARGET_PATH
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
commands:
|
||||||
|
- apk add --update --no-cache openssh rsync git
|
||||||
|
- mkdir -p $HOME/.ssh
|
||||||
|
- echo "$RSYNC_SSHKEY" > $HOME/.ssh/id_ed25519
|
||||||
|
- chmod 0600 $HOME/.ssh/id_ed25519
|
||||||
|
- ssh-keyscan -t ed25519 $RSYNC_TARGET_SERVER >> $HOME/.ssh/known_hosts
|
||||||
|
- rsync -avh --delete ./publish/ $RSYNC_TARGET_USER@$RSYNC_TARGET_SERVER:$RSYNC_TARGET_PATH
|
|
@ -2,7 +2,7 @@ when:
|
||||||
event: push
|
event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build:
|
build:
|
||||||
image: python:3.9
|
image: python:3.9
|
||||||
commands:
|
commands:
|
||||||
|
@ -11,9 +11,8 @@ pipeline:
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
image: node:18
|
image: node:18
|
||||||
environment:
|
|
||||||
- NETLIFY_SITE_ID=a41006ac-4870-484f-9fef-2d45e9546837
|
|
||||||
secrets:
|
secrets:
|
||||||
|
- NETLIFY_SITE_ID
|
||||||
- NETLIFY_AUTH_TOKEN
|
- NETLIFY_AUTH_TOKEN
|
||||||
commands:
|
commands:
|
||||||
- npm install -D netlify-cli
|
- npm install -D netlify-cli
|
||||||
|
|
Loading…
Reference in a new issue