diff --git a/.github/workflows/.github-actions.yml b/.github/workflows/.github-actions.yml index 81b1879..49df2fd 100644 --- a/.github/workflows/.github-actions.yml +++ b/.github/workflows/.github-actions.yml @@ -7,6 +7,11 @@ on: jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest + env: + SSH_PRIVATE_KEY_LOCALCOMPUTER: ${{ secrets.SSH_PRIVATE_KEY_LOCALCOMPUTER }} + MY_VPS_USER: ${{ secrets.v }} + MY_VPS_IP_ADDRESS: ${{ secrets.MY_VPS_IP_ADDRESSMY_VPS_IP_ADDRESS }} + MY_VPS_PROJECT_PATH: ${{ secrets.MY_VPS_PROJECT_PATHv }} steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -20,9 +25,9 @@ jobs: ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." - run: eval $(ssh-agent -s) - - run: bash -c 'ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY_LOCALCOMPUTER }}")' - - run: ssh-keyscan -H ${{ secrets.MY_VPS_IP_ADDRESS }} >> ~/.ssh/known_hosts - - run: ssh ${{ secrets.MY_VPS_USER }}@${{ secrets.MY_VPS_IP_ADDRESS }} - - run: cd ${{ secrets.MY_VPS_PROJECT_PATH }} + - run: ssh-add <(echo "$SSH_PRIVATE_KEY_LOCALCOMPUTER") + - run: ssh-keyscan -H $$MY_VPS_IP_ADDRESS >> ~/.ssh/known_hosts + - run: ssh $MY_VPS_USER@$MY_VPS_IP_ADDRESS + - run: cd $MY_VPS_PROJECT_PATH - run: touch abc.xyz - run: echo "🍏 This job's status is ${{ job.status }}."