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