From 6f80b08427893de5559a6ca803f219ff755a3200 Mon Sep 17 00:00:00 2001 From: Julia Johannesen Date: Mon, 17 Aug 2026 18:40:47 -0400 Subject: [PATCH] Fixies :3 --- .forgejo/workflows/deploy.yaml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 8dd0cb5..34c9010 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -17,7 +17,7 @@ concurrency: jobs: deploy: - runs-on: ubuntu-latest + runs-on: docker steps: - name: Checkout uses: actions/checkout@v6 @@ -30,25 +30,26 @@ jobs: - name: Generate HTML run: | cd go-vanityurls - ln -s ../yanity.yaml ./vanity.yaml + ln -sf ../vanity.yaml ./vanity.yaml go run main.go - - name: Install rclone - run: apt install rclone - - name: Configure rclone + - name: Upload HTML env: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }} + SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }} run: | + apt update && apt install -y expect rclone mkdir ~/.ssh - cat < ~/.ssh/id_ed25519.pub <<< $SSH_PUBLIC_KEY - cat < ~/.ssh/id_ed25519 <<< $SSH_PRIVATE_KEY + cat > ~/.ssh/id_ed25519.pub <<< $SSH_PUBLIC_KEY + cat > ~/.ssh/id_ed25519 <<< $SSH_PRIVATE_KEY + chmod 600 ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub mkdir ~/.config/rclone - cat < ~/.config/rclone/config.conf <<<-EOF - [bridget] - type = sftp - host = bridget - user = www-data + cat > ~/.config/rclone/rclone.conf <<< $'[bridget]\ntype = sftp\nhost = bridget.arimelody.space\nport = 40195\nuser = vanity' + eval `ssh-agent` + expect <<-EOF + spawn ssh-add /root/.ssh/id_ed25519 + expect "Enter passphrase for /root/.ssh/id_ed25519:" + send "$SSH_PASSWORD\n"; + expect "Identity added: /root/.ssh/id_ed25519 (vanity@bridget)" EOF - - name: Upload HTML - run: | rclone sync --delete-during -vv ./go-vanity/public bridget:/var/www/vanity