This commit is contained in:
Thijs Stobbelaar 2023-09-26 15:38:17 +02:00
parent 877e378aae
commit 1fda3dc755

View file

@ -17,16 +17,17 @@ jobs:
id: set-destination id: set-destination
run: | run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "::set-output name=destination::/var/www/lantaeu/DTCH/" echo "DESTINATION=/var/www/lantaeu/DTCH//" >> $GITHUB_ENV
else else
echo "::set-output name=destination::/var/www/lantaeu/DTCH_DEV/" echo "DESTINATION=/var/www/lantaeu/DTCH_DEV/" >> $GITHUB_ENV
fi fi
- name: Sync Files from ${{ github.ref }} - 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: ${{ steps.set-destination.outputs.destination }} destination-path: ${{ env.DESTINATION }}
rsync-options: --no-times -r --exclude=.git* --exclude=*.json --exclude=.git/ --exclude=.github/ --exclude=config.php rsync-options: --no-times -r --exclude=.git* --exclude=*.json --exclude=.git/ --exclude=.github/ --exclude=config.php