workflow v2
Some checks failed
publish / publish (push) Failing after 48s

This commit is contained in:
themelm 2025-05-25 03:09:48 -07:00
parent 8cd0ff920c
commit 8fe5bc6a1b

View file

@ -8,6 +8,8 @@ on:
jobs: jobs:
publish: publish:
runs-on: docker runs-on: docker
container:
image: ghcr.io/hugomods/hugo:exts-0.140.2
env: env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
steps: steps:
@ -17,33 +19,16 @@ jobs:
fetch-depth: 0 # all history for all branches and tags\ fetch-depth: 0 # all history for all branches and tags\
- uses: https://forge.melm.xyz/melmco/setup-go@v5
with:
go-version: '>=1.21.0'
- name: Install Hugo
run: |
wget -O hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.144.2/hugo_extended_0.144.2_linux-amd64.deb
dpkg -i hugo.deb
- uses: https://forge.melm.xyz/melmco/cache@v4
with:
path: |
~/.cache/go-build
~/go
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build - name: Build
run: | run: |
hugo --minify hugo --minify
- name: Deploy - name: rsync deployments
run: | uses: burnett01/rsync-deployments@7.0.2
eval $(ssh-agent -s) with:
echo "$SSH_PRIVATE_KEY" | ssh-add - switches: -avzr --delete
apt update && apt install -y rsync path: ./public/
mkdir ~/.ssh remote_path: /var/www/html/melm.xyz
ssh-keyscan 192.168.1.145 > ~/.ssh/known_hosts remote_host: 192.168.1.145
rsync -atv --progress ./public/ forgejo@192.168.1.145:/var/www/melm.xyz remote_user: forgejo
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}