Skip to content

Update workflow

Update workflow #104

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: Build site with Hugo
runs-on: ubuntu-22.04
strategy:
matrix:
hugo: ["0.88.1"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Hugo
run: |
wget https://github.com/gohugoio/hugo/releases/download/v${{ matrix.hugo }}/hugo_extended_${{ matrix.hugo }}_Linux-64bit.tar.gz
tar xvf hugo_extended_${{ matrix.hugo }}_Linux-64bit.tar.gz
- name: Build site
run: |
cd kotkt.nl
../hugo
- name: Upload site as artifact
uses: actions/upload-artifact@v4
with:
name: site
path: kotkt.nl/public/
deploy:
name: Deploy site to production
runs-on: ubuntu-22.04
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- name: Download website
uses: actions/download-artifact@v4
with:
name: site
path: site
- name: Upload website
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
SOURCE: site/
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
REMOTE_USER: ${{ secrets.DEPLOY_USER }}
TARGET: ${{ secrets.DEPLOY_TARGET }}
ARGS: "-rlgoDzvc -i --delete"