Compare commits

...

10 Commits

Author SHA1 Message Date
informaticker
d7920883ce Initial commit
All checks were successful
Deploy / deploy (push) Successful in 19s
2024-11-04 00:10:00 +01:00
informaticker
3c926ba81d fix actions AGAIN 2024-11-03 23:56:45 +01:00
informaticker
ae95d232fe fix actions AGAIN 2024-11-03 23:52:26 +01:00
informaticker
88de4d04e7 fix actions AGAIN 2024-11-03 23:51:18 +01:00
informaticker
5510565efe fix actions AGAIN 2024-11-03 23:43:10 +01:00
informaticker
fc7a704ea5 fix actions AGAIN 2024-11-03 23:41:12 +01:00
informaticker
af25294c4a fix actions AGAIN 2024-11-03 23:39:21 +01:00
informaticker
972e6876aa fix actions AGAIN 2024-11-03 23:38:10 +01:00
informaticker
cfb8d83d00 fix actions AGAIN 2024-11-03 23:36:56 +01:00
informaticker
779f9ced7a fix actions AGAIN 2024-11-03 23:35:30 +01:00

View File

@ -7,9 +7,11 @@ jobs:
container: container:
image: alpine image: alpine
steps: steps:
- name: Install git and openssh - name: Install packages
run: | run: |
apk add --no-cache git openssh-client apk add --no-cache git openssh-client nodejs
- name: Checkout code
uses: actions/checkout@v3
- name: Setup SSH - name: Setup SSH
env: env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
@ -20,18 +22,11 @@ jobs:
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H $HOST1 >> ~/.ssh/known_hosts ssh-keyscan -H $HOST1 >> ~/.ssh/known_hosts
- name: Deploy to first host - name: Deploy to host
env: env:
HOST1: ${{ secrets.HOST1 }} HOST1: ${{ secrets.HOST1 }}
USER: ${{ secrets.USER }} USER: ${{ secrets.USER }}
run: | run: |
ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*' ssh $USER@$HOST1 'rm -rf /var/www/elia.network/html/*'
chmod -R 777 . scp -r . $USER@$HOST1:/var/www/elia.network/html
scp -r . $USER@$HOST1:/var/www/elia.network/html/
ssh $USER@$HOST1 'rm -r /var/www/elia.network/html/.git*' ssh $USER@$HOST1 'rm -r /var/www/elia.network/html/.git*'
- name: Reload Nginx
env:
HOST1: ${{ secrets.HOST1 }}
USER: ${{ secrets.USER }}
run: |
ssh $USER@$HOST1 'sudo systemctl reload nginx'