From 3a986d4769bed7a957b6952907d5b36a236a8018 Mon Sep 17 00:00:00 2001 From: Naman Sood Date: Tue, 30 Apr 2024 22:19:41 -0400 Subject: [PATCH] .github: unfuck the pipeline Signed-off-by: Naman Sood --- .github/workflows/main.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f354dd..aa447aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,6 @@ jobs: - name: Setup Go 1.19 id: go uses: actions/setup-go@v2 - with: - go-version: '1.19.3' - name: Setup Tailscale id: tailscale uses: tailscale/github-action@v2 @@ -26,8 +24,9 @@ jobs: SSH_KEY: ${{ secrets.SSH_KEY }} run: | set -euxo pipefail + tailscale ping -c 2 $MACHINE mkdir -p ~/.ssh - ssh-keyscan $(tailscale ip -4 $MACHINE) > ~/.ssh/known_hosts + ssh-keyscan $MACHINE > ~/.ssh/known_hosts printf "%s" "$SSH_KEY" > ~/.ssh/key chmod 600 ~/.ssh/key @@ -37,7 +36,7 @@ jobs: - name: Compile blog binary id: compile - run: go build -o prose . + run: go build -o prose ./cmd/prose - name: Build tarball and ship it id: tarball @@ -45,8 +44,8 @@ jobs: TIME=$(date +%Y%m%d-%H%M%S) FILENAME=prose-${TIME}.tar.gz mkdir -p static/css - tar -czf $FILENAME prose fonts/ static/ styles/ templates/ posts/ - echo $FILENAME "github@$(tailscale ip -4 $MACHINE):/home/github/" - scp -i ~/.ssh/key $FILENAME "github@$(tailscale ip -4 $MACHINE):/home/github/" - ssh -i ~/.ssh/key "github@$(tailscale ip -4 $MACHINE)" "tar -C /var/www/blog -xzf ~/$FILENAME" - ssh -i ~/.ssh/key "github@$(tailscale ip -4 $MACHINE)" "sudo systemctl restart prose" + tar -czf $FILENAME prose static/ styles/ templates/ posts/ + echo $FILENAME "github@$MACHINE:/home/github/" + scp -i ~/.ssh/key $FILENAME "github@$MACHINE:/home/github/" + ssh -i ~/.ssh/key "github@$MACHINE" "tar -C /var/www/blog -xzf ~/$FILENAME" + ssh -i ~/.ssh/key "github@$MACHINE" "sudo systemctl restart prose"