From b29645f7bec77f62af49b9b2724c7cceb9f624a5 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Fri, 6 Sep 2024 01:16:26 -0400 Subject: [PATCH] Add deployment job --- .forgejo/workflows/build.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index bbda95b..c34855c 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -25,3 +25,32 @@ jobs: with: name: html.tar.gz path: /tmp/html.tar.gz + deploy: + needs: build + runs-on: docker + steps: + - name: Download tarball + uses: actions/download-artifact@v3 + with: + name: html.tar.gz + path: /tmp + - name: Extract tarball + run: | + tar zxvf /tmp/html.tar.gz -C /tmp + - name: Install Rsync + run: | + apt update && apt install -y rsync + - name: Set up SSH key + run: | + mkdir -p ~/.ssh + cat < ~/.ssh/config + Host reason + HostName reason.sailmaker.fenix.lgbt + User correlr + IdentityFile ~/.ssh/id_rsa + StrictHostKeyChecking no + EOF + echo "${{ secrets.ssh_private_key }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + - name: Rsync HTML + run: rsync -avz --delete /tmp/public/ reason:Public/hugo/