This commit is contained in:
@@ -19,19 +19,16 @@ jobs:
|
||||
|
||||
- name: Install MkDocs & Plugins
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install mkdocs mkdocs-material
|
||||
python -m pip install --root-user-action=ignore --upgrade pip
|
||||
pip install --root-user-action=ignore mkdocs mkdocs-material
|
||||
|
||||
- name: Build Static Site
|
||||
run: mkdocs build
|
||||
|
||||
- name: Deploy to Web Server via SSH
|
||||
# uses: https://git.weseng.de
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.WEB_HOST }}
|
||||
username: ${{ secrets.WEB_USER }}
|
||||
key: ${{ secrets.WEB_KEY }}
|
||||
source: "site/*"
|
||||
target: "/var/www/git-pages/"
|
||||
strip_components: 1 # Removes the "site/" folder layer so content dumps directly into your web root
|
||||
- name: Deploy to Web Server Folder
|
||||
run: |
|
||||
# Clear the destination folder first to remove old deleted files
|
||||
rm -rf /var/www/git-pages/*
|
||||
|
||||
# Copy everything from the built 'site' folder directly to your web root
|
||||
cp -R site/* /var/www/git-pages/
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
name: Test SSH Connection
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Allows you to trigger this manually from the Gitea UI
|
||||
|
||||
jobs:
|
||||
test-ssh:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run SSH Command Test
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.WEB_HOST }}
|
||||
port: ${{ secrets.WEB_PORT }}
|
||||
username: ${{ secrets.WEB_USER }}
|
||||
key: ${{ secrets.WEB_KEY }}
|
||||
script: |
|
||||
echo "Successfully connected!"
|
||||
whoami
|
||||
pwd
|
||||
Reference in New Issue
Block a user