.drone.yml - use sshpass for deploys [WIP]
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
4980812fa0
commit
0c013a5843
@ -33,13 +33,14 @@ steps:
|
|||||||
HUGO_DIR:
|
HUGO_DIR:
|
||||||
from_secret: hugo_dir
|
from_secret: hugo_dir
|
||||||
commands:
|
commands:
|
||||||
|
- pacman -Sy --needed --noconfirm sshpass
|
||||||
- git submodule init
|
- git submodule init
|
||||||
- git submodule update
|
- git submodule update
|
||||||
- rm -rfv ./public
|
- rm -rfv ./public
|
||||||
- hugo --gc=true --minify
|
- hugo --gc=true --minify
|
||||||
- echo $HUGO_KEY > ./hugo_deploy
|
- echo $HUGO_KEY > ./hugo_deploy
|
||||||
- chmod -v 600 ./hugo_deploy
|
- chmod -v 600 ./hugo_deploy
|
||||||
- rsync -av -e 'ssh -vv -i ./hugo_deploy -o KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 -o PreferredAuthentications=publickey -o PubkeyAuthentication=yes -o PasswordAuthentication=no -c aes256-ctr,aes256-cbc -o StrictHostKeyChecking=no' --delete public/ $HUGO_USER@$HUGO_HOST:$HUGO_DIR
|
- rsync -av -e "sshpass -p $HUGO_PASSWD ssh -vv -i ./hugo_deploy -o KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 -o PreferredAuthentications=publickey -o PubkeyAuthentication=yes -o PasswordAuthentication=no -c aes256-ctr,aes256-cbc -o StrictHostKeyChecking=no" --delete public/ $HUGO_USER@$HUGO_HOST:$HUGO_DIR
|
||||||
- shred -zuv -n 7 ./hugo_deploy
|
- shred -zuv -n 7 ./hugo_deploy
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
@ -80,7 +81,7 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
image: appleboy/drone-discord:1.2.4
|
image: appleboy/drone-discord:1.2.4
|
||||||
settings:
|
settings:
|
||||||
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{/success}}\n"
|
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{/success}}\n"
|
||||||
webhook_id:
|
webhook_id:
|
||||||
from_secret: discord_webhook_id
|
from_secret: discord_webhook_id
|
||||||
webhook_token:
|
webhook_token:
|
||||||
@ -116,7 +117,7 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
image: appleboy/drone-discord:1.2.4
|
image: appleboy/drone-discord:1.2.4
|
||||||
settings:
|
settings:
|
||||||
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{/success}}\n"
|
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{/success}}\n"
|
||||||
webhook_id:
|
webhook_id:
|
||||||
from_secret: discord_webhook_hourly_id
|
from_secret: discord_webhook_hourly_id
|
||||||
webhook_token:
|
webhook_token:
|
||||||
|
Loading…
Reference in New Issue
Block a user