This commit is contained in:
@@ -19,19 +19,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Install MkDocs & Plugins
|
- name: Install MkDocs & Plugins
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --root-user-action=ignore --upgrade pip
|
||||||
pip install mkdocs mkdocs-material
|
pip install --root-user-action=ignore mkdocs mkdocs-material
|
||||||
|
|
||||||
- name: Build Static Site
|
- name: Build Static Site
|
||||||
run: mkdocs build
|
run: mkdocs build
|
||||||
|
|
||||||
- name: Deploy to Web Server via SSH
|
- name: Deploy to Web Server Folder
|
||||||
# uses: https://git.weseng.de
|
run: |
|
||||||
uses: appleboy/scp-action@master
|
# Clear the destination folder first to remove old deleted files
|
||||||
with:
|
rm -rf /var/www/git-pages/*
|
||||||
host: ${{ secrets.WEB_HOST }}
|
|
||||||
username: ${{ secrets.WEB_USER }}
|
# Copy everything from the built 'site' folder directly to your web root
|
||||||
key: ${{ secrets.WEB_KEY }}
|
cp -R site/* /var/www/git-pages/
|
||||||
source: "site/*"
|
|
||||||
target: "/var/www/git-pages/"
|
|
||||||
strip_components: 1 # Removes the "site/" folder layer so content dumps directly into your web root
|
|
||||||
|
|||||||
@@ -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