Skip to content

Update hugo-build-deploy.yml #150

Update hugo-build-deploy.yml

Update hugo-build-deploy.yml #150

# delivery.yml
on:
push:
branches: [ trunk ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.68.3'
# extended: true
- name: Build
run: hugo
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
name: exoscale
key: ${{ secrets.EXOSCALE_SSH_PRIVATE_KEY }}
known_hosts: "banana"
if_key_exists: replace
- name: Adding Exoscale to Known Hosts
run: |
ssh-keyscan -H ${{ secrets.EXOSCALE_SSH_HOST }} > ~/.ssh/known_hosts
- name: Deploy to exoscale
run: |
rsync -avzr --checksum -e "ssh -i ~/.ssh/exoscale" ./public/ ubuntu@${{ secrets.EXOSCALE_SSH_HOST }}:/www/wtcd/