From 12202d915e76f5e620d043915376984cfbbddede Mon Sep 17 00:00:00 2001 From: Jonas Simoen Date: Sat, 21 Oct 2023 14:42:26 +0200 Subject: [PATCH] fix build --- .github/workflows/deploy.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 27d000f..3502ad0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -17,10 +17,13 @@ jobs: steps: - name: Setup SSH run: | + which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) + eval $(ssh-agent -s) + ssh-add <(echo "$SSH_PRIVATE_KEY" ) mkdir -p ~/.ssh chmod 700 ~/.ssh - echo 'echo $SSH_PASSPHRASE' > ~/.ssh/passphrase && chmod 700 ~/.ssh/passphrase - SSH_ASKPASS_REQUIRE=force SSH_ASKPASS="/root/.ssh/pass" ssh-add $SSH_PRIVATE_KEY + ssh-keyscan $SERVER_IP >> ~/.ssh/known_hosts + chmod 644 ~/.ssh/known_hosts - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - run: npm install yarn -g @@ -30,11 +33,4 @@ jobs: yarn build - name: Deploy run: | - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) - eval $(ssh-agent -s) - cat $SSH_PRIVATE_KEY | tr -d '\r' | DISPLAY=None SSH_ASKPASS=~/.ssh/passphrase ssh-add - - mkdir -p ~/.ssh - chmod 700 ~/.ssh - ssh-keyscan $SERVER_IP >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts scp -r build/* root@$SERVER_IP:/var/www/html/fantasy.simoen.tech/_work/edd-APP/edd-APP/build