From 533ac682d648eea470aa1efcb84dae252a9ccea1 Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 14:55:53 -0300 Subject: [PATCH 1/7] Refactor deployment workflow to use SSH with rsync Updated deployment process to use SSH and rsync. --- .github/workflows/deploy.yml | 39 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cc7ba81..96e90b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,30 +1,29 @@ -name: Deploy do Tema WordPress no Servidor +name: Deploy do Tema WordPress on: push: - branches: - - main + branches: [main] jobs: deploy: runs-on: ubuntu-latest steps: - - name: 🚚 Baixando o código do repositório - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 - - name: 🚀 Enviando o tema para o servidor via SFTP - uses: SamKirkland/FTP-Deploy-Action@4.3.3 - with: - server: ${{ secrets.FTP_SERVER }} - username: ${{ secrets.FTP_USERNAME }} - password: ${{ secrets.FTP_PASSWORD }} - port: ${{ secrets.FTP_PORT }} - protocol: ftp - local-dir: ./ - server-dir: /public_html/wp-content/themes/site-learninglab/ - exclude: | - **/.git* - **/.git*/** - **/node_modules/** - .github/** + - name: Configurar SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts + + - name: Deploy com rsync + run: | + rsync -avz --delete \ + --exclude=".git" \ + --exclude=".github" \ + --exclude="node_modules" \ + -e "ssh -i ~/.ssh/id_ed25519" \ + ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/learninglab.com.br/wp-content/themes/site-learninglab/ From 1dab9f5db00e37d403f64af5326588dad05f0428 Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 16:05:07 -0300 Subject: [PATCH 2/7] Update deployment path in deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 96e90b7..488fbc7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: --exclude=".github" \ --exclude="node_modules" \ -e "ssh -i ~/.ssh/id_ed25519" \ - ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/learninglab.com.br/wp-content/themes/site-learninglab/ + ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ From 70a9fe281a65fea866c974c69dfecf7cf2ba7adc Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 16:12:44 -0300 Subject: [PATCH 3/7] Fix rsync command in deploy workflow Corrected the rsync command by removing duplicate SSH user and host. --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 488fbc7..b69153f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,4 +26,4 @@ jobs: --exclude=".github" \ --exclude="node_modules" \ -e "ssh -i ~/.ssh/id_ed25519" \ - ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ + ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ From e19974f52902984c005e9af145e42d1b111c180e Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 16:14:59 -0300 Subject: [PATCH 4/7] Update SSH port for deployment in workflow --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b69153f..62f37f5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts + ssh-keyscan -p 2222 -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - name: Deploy com rsync run: | @@ -25,5 +25,5 @@ jobs: --exclude=".git" \ --exclude=".github" \ --exclude="node_modules" \ - -e "ssh -i ~/.ssh/id_ed25519" \ + -e "ssh -p 2222 -i ~/.ssh/id_ed25519" \ ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ From ef15c868248d77b3bd1e1513ab27812aededd24b Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 16:19:37 -0300 Subject: [PATCH 5/7] Modify SSH options for rsync deployment Updated SSH command for rsync deployment to disable strict host key checking. --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 62f37f5..179df68 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,6 @@ jobs: mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan -p 2222 -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts - name: Deploy com rsync run: | @@ -25,5 +24,5 @@ jobs: --exclude=".git" \ --exclude=".github" \ --exclude="node_modules" \ - -e "ssh -p 2222 -i ~/.ssh/id_ed25519" \ + -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" \ ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ From cd17ac5c9aaff9daaa63514fae26128cc5e46f92 Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 16:23:48 -0300 Subject: [PATCH 6/7] Change SSH port for deployment in workflow --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 179df68..6bbcb57 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,5 +24,5 @@ jobs: --exclude=".git" \ --exclude=".github" \ --exclude="node_modules" \ - -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" \ + -e "ssh -p 2222 -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" \ ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ From af38b34d5a1104e826cce7b409a7bb25904b6189 Mon Sep 17 00:00:00 2001 From: Douglas Nascimento <115051705+douglasfnascimento@users.noreply.github.com> Date: Fri, 24 Apr 2026 16:39:30 -0300 Subject: [PATCH 7/7] Change deployment method to FTP Replaced SSH deployment with FTP synchronization using FTP-Deploy-Action. --- .github/workflows/deploy.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6bbcb57..561b758 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy do Tema WordPress +name: Deploy do Tema WordPress via FTP on: push: @@ -6,23 +6,22 @@ on: jobs: deploy: + name: Deploy runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Configurar SSH - run: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - - name: Deploy com rsync - run: | - rsync -avz --delete \ - --exclude=".git" \ - --exclude=".github" \ - --exclude="node_modules" \ - -e "ssh -p 2222 -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" \ - ./ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home2/gestll05/learninglab.com.br/wp-content/themes/site-learninglab/ + - name: Sincronizar arquivos via FTP + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 + with: + server: ${{ secrets.FTP_SERVER }} + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + local-dir: ./ + server-dir: ./learninglab.com.br/wp-content/themes/site-learninglab/ + exclude: | + **/.git* + **/.git*/** + **/node_modules/**