Update .gitea/workflows/build_and_deploy.yaml
All checks were successful
Build and Deploy Zola Site / build (push) Successful in 19s

This commit is contained in:
2025-10-09 14:13:21 +00:00
parent 73dfced4aa
commit d83ca13011

View File

@@ -52,26 +52,26 @@ jobs:
#----------------------------------------------------
# JOB 2: Deploy the built site to the web server
#----------------------------------------------------
deploy:
runs-on: ubuntu-latest
deploy:
runs-on: ubuntu-latest
needs: build
steps:
# Step 1: Download the artifact from the 'build' job
- name: Download artifact
uses: actions/download-artifact@v3 # Use v3 instead of v4
uses: actions/download-artifact@v3
with:
name: zola-public
- name: List downloaded files
# This debugging step is very useful to confirm the file structure
- name: List files in workspace
run: ls -laR
# Step 2: Copy the files to the web server using SCP
- name: SCP files to server
uses: appleboy/scp-action@master
working-directory: ./zola-public
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: ".*" # Copies the content of the downloaded artifact directory
target: "/var/www/html/finmoon" # The document root on your Apache server
rm: true # Removes existing files in the target directory before copying
source: "."
target: "/var/www/html/finmoon"
rm: true