Skip to content

Website

Website #24

Workflow file for this run

name: Website
on:
workflow_dispatch:
push:
paths:
- "website/**"
branches:
- main
jobs:
build:
name: Deploy Website
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v3
- name: ✨ Setup Hugo
env:
HUGO_VERSION: 0.92.2
run: |
mkdir ~/hugo
cd ~/hugo
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
tar -xvzf hugo.tar.gz
sudo mv hugo /usr/local/bin
- name: 🛠️ Build
run: hugo --source website --minify
- name: 🔐 Create Key File
run: install -m 600 -D /dev/null ~/.ssh/id_rsa
- name: 🔑 Install SSH Key
run: echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa
- name: 🚀 Deploy
run: rsync --archive --delete --stats -e 'ssh -p 18765 -o StrictHostKeyChecking=no' website/public/ ${{ secrets.REMOTE_DEST }}