Refactor deploy steps logic in pipeline-test.yaml file
All checks were successful
Build and Deploy Hugo Site / build_and_deploy (push) Successful in 16s

This commit is contained in:
Andreas Hnida 2024-04-18 09:02:15 +02:00
commit e6d663535c

View file

@ -25,6 +25,9 @@ jobs:
file: 'hugo.toml'
field: 'environment'
- name: Echo environment
run: echo "Environment is ${{ steps.read_toml.outputs.environment }}"
# - name: Set up Go
# uses: actions/setup-go@v5.0.0
# with:
@ -76,17 +79,11 @@ jobs:
- name: Deploy to Development
if: steps.read_toml.outputs.environment == 'development'
run: |
rsync -avz --delete ./public/ verua.info@verua.info:/preview.verua.info/
env:
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
run: echo "Running steps for Development Environment"
- name: Deploy to Production
if: steps.read_toml.outputs.environment == 'production'
run: |
rsync -avz --delete ./public/ verua.info@verua.info:/httpdocs/
env:
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
run: echo "Running steps for Production Environment"
# - name: Deploy to Development
# if: env.myEnv_env == 'development'