Some checks failed
Build and Deploy Hugo Site / build_and_deploy (push) Failing after 16s
41 lines
1.1 KiB
YAML
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'
|