actions test

This commit is contained in:
André Menrath 2023-11-25 13:26:52 +01:00
parent 5252893962
commit fa961d18f7

View file

@ -10,11 +10,13 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: secrets.SSH_PRIVATE_KEY != '' if: secrets.SSH_PRIVATE_KEY != '' and secrets.SSH_HOST_KEY != ''
steps: steps:
- uses: https://code.forgejo.org/actions/checkout@v4 - uses: https://code.forgejo.org/actions/checkout@v4
- run: mkdir ~/.ssh - run: mkdir ~/.ssh
- run: echo "${{ secrets.SSH_HOST_KEY }}" > ~/.ssh/known_hosts
- run: chmod 600 ~/.ssh/known_hosts
- run: apt update && apt install -y openssh-client rsync - run: apt update && apt install -y openssh-client rsync
- run: eval $(ssh-agent -s) && echo "${{ secrets.SSH_PRIVATE_KEY }}" | ssh-add - - run: eval $(ssh-agent -s) && echo "${{ secrets.SSH_PRIVATE_KEY }}" | ssh-add -
- run: rsync -avzr --delete ${{ github.workspace }}/ hosting187597@hosting187597.a2f96.netcup.net:~/wordpress-test.event-federation.eu/wp-content/plugins/ - run: rsync -avzr --delete ${{ github.workspace }}/ hosting187597@hosting187597.a2f96.netcup.net:~/wordpress-test.event-federation.eu/wp-content/plugins/