diff --git a/.forgejo/workflows/demo.yaml b/.forgejo/workflows/demo.yaml index 0742680..e6441db 100644 --- a/.forgejo/workflows/demo.yaml +++ b/.forgejo/workflows/demo.yaml @@ -29,8 +29,14 @@ jobs: # path: /workspace/YannK/Actions_tests/Actions_tests/site secret_test: + name: SSH connection tests runs-on: bookworm steps: - - name: Test de secret + - name: Install SSH key to proper place run: | - echo {{ secrets.CD_SECRET_NUMBER_1 }} \ No newline at end of file + install -m 600 -D /dev/null ~/.ssh/id_rsa + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts + - name: Connect and check + run: | + ssh -i ~/.ssh/id_rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "ls -al" \ No newline at end of file