Update .gitea/workflows/deploy.yml
This commit is contained in:
@@ -1,20 +1,13 @@
|
|||||||
name: Deploy Timelapse
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
on:
|
build:
|
||||||
push:
|
image: alpine:latest
|
||||||
branches:
|
stage: build
|
||||||
- main
|
script:
|
||||||
|
- apk add --no-cache openssh
|
||||||
jobs:
|
- mkdir -p ~/.ssh
|
||||||
deploy_timelapse:
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
runs-on: ubuntu-latest
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
steps:
|
- ssh-keyscan 192.168.1.87 >> ~/.ssh/known_hosts
|
||||||
- name: Set up SSH
|
- ssh -i ~/.ssh/id_rsa kerboul@192.168.1.87 'echo "Connexion réussie"'
|
||||||
run: |
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
||||||
chmod 600 ~/.ssh/id_rsa
|
|
||||||
ssh-keyscan -H 192.168.1.87 >> ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Execute update_timelapse script
|
|
||||||
run: ssh kerboul@192.168.1.87 "cd /home/kerboul/scripts/timelapse && ./update_timelapse.sh -o"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user