BRANCH BASED

This commit is contained in:
Lanta 2025-03-13 15:08:07 +01:00
parent 1e5d688991
commit fd355a627b

View file

@ -3,12 +3,22 @@ on:
branches: branches:
- dev - dev
- main - main
name: Publish Website name: Publish Website
jobs: jobs:
web-deploy: web-deploy:
name: Deploy based on branch name: Deploy based on branch
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set destination path based on branch
id: set-destination
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "DESTINATION=/Lantaeu/dtch/" >> $GITHUB_ENV
else
echo "DESTINATION=/Lantaeu/dtch_dev/" >> $GITHUB_ENV
fi
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -20,7 +30,7 @@ jobs:
password: ${{secrets.SYNPASS}} password: ${{secrets.SYNPASS}}
port: 22 port: 22
uploads: | uploads: |
./ => ./Lantaeu/dtch_dev ./ => ${{ env.DESTINATION }}
ignore: | ignore: |
*.git *.git
*/**/*git* */**/*git*