From 7fdf4b37eeb252ca15b5381d05aa4def5fb732d0 Mon Sep 17 00:00:00 2001 From: Julian Martinez Date: Fri, 6 Oct 2023 11:32:36 -0700 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b421635f..4a0f9a2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,11 +15,6 @@ jobs: - name: Checkout App Repo uses: actions/checkout@v3 - - name: Setup SSH Agent - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Setup Node uses: actions/setup-node@v3 with: @@ -27,6 +22,26 @@ jobs: cache: 'yarn' cache-dependency-path: '**/yarn.lock' + - name: Start SSH Agent + run: | + eval $(ssh-agent -s) + + - name: Setup SSH Key + env: + PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + run: | + echo "$PRIVATE_KEY" > private_key + chmod 600 private_key + ssh-add private_key + rm -f private_key + + - name: Configure SSH + run: | + mkdir -p ~/.ssh + echo "Host github.com" >> ~/.ssh/config + echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config + echo " StrictHostKeyChecking no" >> ~/.ssh/config + - name: Install App Dependencies run: yarn --prefer-offline