Skip to content

Commit

Permalink
add github action: hugo-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
langchr86 committed Jun 8, 2024
1 parent 430aa34 commit 009b81e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/hugo-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# based on: https://swharden.com/blog/2022-03-20-github-actions-hugo/

name: hugo-deploy

on:
workflow_dispatch:
push:
branches:
- master
- feature/action

jobs:
deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Setup Hugo
env:
HUGO_VERSION: 0.125.4
run: |
mkdir ~/hugo
cd ~/hugo
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${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 --minify

- name: Create empty key file
run: install -m 600 -D /dev/null ~/.ssh/id_rsa
- name: Populate key
run: echo "${{ secrets.PRIVATE_SSH_KEY }}" > ~/.ssh/id_rsa

- name: Upload
run: rsync --archive --stats -e 'ssh -o StrictHostKeyChecking=no' public/ [email protected]:22/home/tsvmetta/www/jtf2025.ch/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
tsv-jtf2025-web
===============

[![hugo-deploy](https://github.com/langchr86/tsv-jtf2025-web/actions/workflows/hugo-deploy.yml/badge.svg)](github.com/langchr86/tsv-jtf2025-web/actions/workflows/hugo-deploy.yml)

Das ist das [Hugo](https://gohugo.io)-Projekt für den Webauftritt des Jugendturnfest 2025 im Mettauertal.

0 comments on commit 009b81e

Please sign in to comment.