website/.gitea/workflows/pipeline-test.yaml
Andreas Hnida 0acb12e8c0
Some checks failed
Build and Deploy Hugo Site / build_and_deploy (push) Failing after 16s
Fix paths in rsync commands in pipeline-test.yaml
2024-04-17 23:51:46 +02:00

41 lines
1.1 KiB
YAML

name: Build and Deploy Hugo Site
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: env-yaml-file
uses: pietrobolcato/action-read-yaml@main
id: read_action_js
with:
config: ${{ github.workspace }}/deploy_env.yaml
env-var-prefix: myEnv
- name: Setup rsync
run: apt-get update && apt-get install -y rsync
- name: Setup SSH Key
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.VFO_SSH_KEY }}
- name: Deploy to Development
if: env.myEnv_env == 'development'
run: |
rsync -avz --delete /public/ verua.info@verua.info:/preview.verua.info/
env:
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'
- name: Deploy to Production
if: env.myEnv_env == 'production'
run: |
rsync -avz --delete /public/ verua.info@verua.info:/httpdocs/
env:
RSYNC_RSH: 'ssh -p 2121 -o StrictHostKeyChecking=no'