Dev #23

Merged
OpzekerIT merged 10 commits from dev into main 2023-09-26 13:39:33 +00:00
Showing only changes of commit 877e378aae - Show all commits

View file

@ -2,21 +2,31 @@ on:
push: push:
branches: branches:
- dev - dev
- main
name: Publish Website name: Publish Website
jobs: jobs:
web-deploy: web-deploy:
name: Deploy on commit DEV name: Deploy based on branch
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Get Latest Code - name: Get Latest Code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Sync Files - name: Set destination path based on branch
id: set-destination
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "::set-output name=destination::/var/www/lantaeu/DTCH/"
else
echo "::set-output name=destination::/var/www/lantaeu/DTCH_DEV/"
fi
- name: Sync Files from ${{ github.ref }}
uses: SamKirkland/web-deploy@v1 uses: SamKirkland/web-deploy@v1
with: with:
target-server: lanta.eu target-server: lanta.eu
remote-user: stats remote-user: stats
private-ssh-key: ${{ secrets.SSH_KEY }} private-ssh-key: ${{ secrets.SSH_KEY }}
destination-path: /var/www/lantaeu/DTCH_DEV/ destination-path: ${{ steps.set-destination.outputs.destination }}
rsync-options: --no-times -r --exclude=.git* --exclude=*.json --exclude=.git/ --exclude=.github/ rsync-options: --no-times -r --exclude=.git* --exclude=*.json --exclude=.git/ --exclude=.github/ --exclude=config.php