test
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 53s

This commit is contained in:
Andreas Hnida 2024-07-29 12:48:58 +02:00
commit 873b3a66d7

View file

@ -22,15 +22,15 @@ jobs:
steps: steps:
- uses: actions/checkout@v2.4.0 - uses: actions/checkout@v2.4.0
- name: env-toml-file # - name: env-toml-file
uses: SebRollen/toml-action@v1.2.0 # uses: SebRollen/toml-action@v1.2.0
id: read_toml # id: read_toml
with: # with:
file: 'hugo.toml' # file: 'hugo.toml'
field: 'params.environment' # field: 'params.environment'
- name: Echo environment # - name: Echo environment
run: echo "Environment is ${{ steps.read_toml.outputs.value }}" # run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5.0.0 uses: actions/setup-go@v5.0.0
@ -67,17 +67,18 @@ jobs:
ssh-private-key: ${{ secrets.VFO_SSH_KEY }} ssh-private-key: ${{ secrets.VFO_SSH_KEY }}
- name: Deploy to Development - name: Deploy to Development
if: gitea.ref == '/heads/dev' if: github.ref == 'refs/heads/dev'
run: | run: |
echo "Deploying to Development Environment" echo "Running steps for Development Environment"
echo "user: $DEV_USER host: $DEV_HOST path: $DEV_PATH"
rsync -avz ./public/ $DEV_USER@$DEV_HOST:$DEV_PATH rsync -avz ./public/ $DEV_USER@$DEV_HOST:$DEV_PATH
env: env:
RSYNC_RSH: 'ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no' RSYNC_RSH: 'ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no'
- name: Deploy to Production - name: Deploy to Production
if: gitea.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
run: | run: |
echo "Deploying to Production Environment" echo "Running steps for Production Environment"
rsync -avz ./public/ $PROD_USER@$PROD_HOST:$PROD_PATH rsync -avz ./public/ $PROD_USER@$PROD_HOST:$PROD_PATH
env: env:
RSYNC_RSH: 'ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no' RSYNC_RSH: 'ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no'