From 1b5a341c9eff4e887b3847be3e6442d1d2f1d65d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 12 Sep 2024 18:31:34 +0100 Subject: [PATCH] Deploy the website from GitHub Actions --- .github/workflows/main.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c8b8e5b2..5e597903 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -31,3 +31,12 @@ jobs: env: APP_ENV: prod NODE_ENV: production + + - name: Install the deploy key and known hosts + run: | + mkdir -p ~/.ssh && chmod 700 ~/.ssh + echo "${{ secrets.SSH_DEPLOY_KEY }}" > ~/.ssh/deploy && chmod 600 ~/.ssh/deploy + echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts && chmod 600 ~/.ssh/known_hosts + + - name: Deploy the website + run: ssh -i ~/.ssh/deploy oliverdavies-uk@ssh.oliverdavies.uk