attempt_2
All checks were successful
/ deploy (push) Successful in 42s

This commit is contained in:
Mans Ziesel 2024-04-27 19:43:44 +02:00
parent a52d7f459f
commit ad422cbeea

View File

@ -13,6 +13,9 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
RUNNER_TOOL_CACHE: /toolcache
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -33,8 +36,6 @@ jobs:
run: tar -cf website.tar -C public . run: tar -cf website.tar -C public .
- name: Setup ssh - name: Setup ssh
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: | run: |
mkdir -p /home/runner/.ssh mkdir -p /home/runner/.ssh
ssh-keyscan ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts ssh-keyscan ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
@ -44,17 +45,12 @@ jobs:
ssh-add /home/runner/.ssh/id_deployer ssh-add /home/runner/.ssh/id_deployer
- name: Deploy to server - name: Deploy to server
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: | run: |
echo "Dit is een test (waarum runt dit niet??????)" echo "Dit is een test (waarum runt dit niet??????)"
ls ${{ gitea.workspace }} scp -i ~/.ssh/id_deployer ./website.tar ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{SCP_DEST}}
ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} "rm -r ${{WEB_DIR}}/*"
# echo 'scp -i ~/.ssh/id_deployer ./website.tar ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{SCP_DEST}}' ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} "tar -xf ${{SCP_DEST}}/website.tar --directory ${{WEB_DIR}}/"
# scp -i ~/.ssh/id_deployer ./website.tar ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:${{SCP_DEST}} ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} "rm ${{SCP_DEST}}/website.tar"
# ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} 'rm -r ${{WEB_DIR}}/*'
# ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} 'tar -xf ${{SCP_DEST}}/website.tar --directory ${{WEB_DIR}}/'
# ssh ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}} 'rm ${{SCP_DEST}}/website.tar'