-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (28 loc) · 1.01 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Deploy
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
TWITTER_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_SECRET: ${{ secrets.TWITTER_API_KEY_SECRET }}
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
TWITTER_TOKEN_SECRET: ${{ secrets.TWITTER_TOKEN_SECRET }}
run: |
mkdir -p ${HOME}/.ssh
printf "%s\n" "$KNOWN_HOSTS" > ${HOME}/.ssh/known_hosts
printf "%s\n" "$DEPLOY_KEY" > ${HOME}/.ssh/id_ed25519
chmod 600 ${HOME}/.ssh/id_ed25519
rsync -a ./ [email protected]:/home/alain/src/
ssh [email protected] '
/home/alain/venv/bin/python -m pip install --upgrade pip;
/home/alain/venv/bin/python -m pip install --upgrade /home/alain/src/;
sudo systemctl restart alain.service'