Update .gitea/workflows/build_and_deploy.yaml
All checks were successful
Build and Deploy Zola Site / build (push) Successful in 19s
All checks were successful
Build and Deploy Zola Site / build (push) Successful in 19s
This commit is contained in:
@@ -52,26 +52,26 @@ jobs:
|
|||||||
#----------------------------------------------------
|
#----------------------------------------------------
|
||||||
# JOB 2: Deploy the built site to the web server
|
# JOB 2: Deploy the built site to the web server
|
||||||
#----------------------------------------------------
|
#----------------------------------------------------
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
# Step 1: Download the artifact from the 'build' job
|
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v3 # Use v3 instead of v4
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: zola-public
|
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
|
run: ls -laR
|
||||||
|
|
||||||
# Step 2: Copy the files to the web server using SCP
|
|
||||||
- name: SCP files to server
|
- name: SCP files to server
|
||||||
uses: appleboy/scp-action@master
|
uses: appleboy/scp-action@master
|
||||||
|
working-directory: ./zola-public
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SSH_HOST }}
|
host: ${{ secrets.SSH_HOST }}
|
||||||
username: ${{ secrets.SSH_USERNAME }}
|
username: ${{ secrets.SSH_USERNAME }}
|
||||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
source: ".*" # Copies the content of the downloaded artifact directory
|
source: "."
|
||||||
target: "/var/www/html/finmoon" # The document root on your Apache server
|
target: "/var/www/html/finmoon"
|
||||||
rm: true # Removes existing files in the target directory before copying
|
rm: true
|
||||||
Reference in New Issue
Block a user