From f6395beca64cc146b8f836e75096e7ea4e48f88b Mon Sep 17 00:00:00 2001 From: Stellar Rounin Date: Thu, 1 Oct 2026 20:16:14 -0600 Subject: build(gh) --- .github/workflows/deploy.yml | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) (limited to '.github') diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c5f19c5..34c55ed 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,6 @@ on: jobs: deploy: environment: site - tierhive - runs-on: ubuntu-latest steps: @@ -23,32 +22,23 @@ jobs: - name: Build run: hugo --minify - - name: Check secrets + - name: Install lftp + run: sudo apt-get update && sudo apt-get install -y lftp + + - name: Deploy env: TH_USER: ${{ secrets.TH_USER }} TH_KEY: ${{ secrets.TH_KEY }} run: | - if [ -n "$TH_USER" ]; then - echo "✅ TH_USER está disponible" - else - echo "❌ TH_USER está vacío" - exit 1 - fi - - if [ -n "$TH_KEY" ]; then - echo "✅ TH_KEY está disponible" - else - echo "❌ TH_KEY está vacío" - exit 1 - fi - - - name: Deploy - uses: wlixcc/SFTP-Deploy-Action@v1.2.4 - with: - server: us.4.pages.tierhive.com - port: '3523' - username: ${{ secrets.TH_USER }} - ssh_private_key: ${{ secrets.TH_KEY }} - local_path: ./public/* - remote_path: /page-stellarrounin-com/ - sftp_only: true + mkdir -p ~/.ssh + chmod 700 ~/.ssh + + printf '%s\n' "$TH_KEY" > ~/.ssh/tierhive_key + chmod 600 ~/.ssh/tierhive_key + + lftp sftp://$TH_USER@us.4.pages.tierhive.com:3523 \ + -e " + set sftp:connect-program 'ssh -a -x -i ~/.ssh/tierhive_key -o StrictHostKeyChecking=no'; + mirror --reverse --delete public/ page-stellarrounin-com/; + quit + " -- cgit v1.3