fix-publish-action #2

Merged
alexander.lyall merged 2 commits from fix-publish-action into main 2025-11-08 18:32:38 +00:00

View File

@@ -1,26 +1,31 @@
name: Publish name: Publish to Server
run-name: ${{ gitea.actor }} is publishing your site using Gitea Actions 🚀 run-name: ${{ gitea.actor }} is publishing your site using Gitea Actions 🚀
on: on:
workflow_dispatch: workflow_dispatch:
# Trigger the workflow on push
push: push:
branches: [main] branches: [main]
# Authenticate to the the server via ssh
# and run our deployment script (sftp upload)
jobs: jobs:
publish: deploy:
name: Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v3
- name: SFTP upload - name: SFTP upload
uses: Dylan700/sftp-upload-action@v1.2.3 uses: Dylan700/sftp-upload-action@latest
with: with:
server: sagittarius.premium.hostns.io server: ${{ vars.SSH_HOST }}
username: adcmnetworks username: ${{ vars.SSH_USERNAME }}
key: ${{secrets.PRIVATE_KEY}} key: ${{ secrets.SSH_KEY }}
port: 22 port: 22
uploads: | uploads: |
./export => /home/adcmnetworks/csbox ${{ vars.GIT_FOLDER }} => ${{ vars.SSH_FOLDER }}
delete: 'true' delete: 'true'
ignore: | ignore: |
*.git *.git