Skip to content

Merge branch 'develop' of https://github.com/whostler/website into de… #7

Merge branch 'develop' of https://github.com/whostler/website into de…

Merge branch 'develop' of https://github.com/whostler/website into de… #7

Workflow file for this run

name: Deploy WordPress DEV
on:
push:
branches:
- develop # Replace 'main' with your preferred branch if necessary
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Sync WordPress Files to Server
env:
RSYNC_OPTIONS: '-avz --delete'
DEPLOY_PATH: '/opt/website/' # Replace with your server path
SERVER_USER: 'www-data' # Replace with your server username
SERVER_HOST: '177.92.144.247' # Replace with your server hostname or IP
run: |
rsync $RSYNC_OPTIONS ./ ${{ env.SERVER_USER }}@${{ env.SERVER_HOST }}:${{ env.DEPLOY_PATH }}
- name: Run WordPress Deployment Script
env:
SERVER_USER: 'www-data' # Replace with your server username
SERVER_HOST: '177.92.144.247' # Replace with your server hostname or IP
run: |
ssh ${{ env.SERVER_USER }}@${{ env.SERVER_HOST }} "cd ${{ env.DEPLOY_PATH }} && ./deploy.sh"