jmopines/.forgejo/workflows/build.yml
Jean-Michel Tremblay d91da65f32
Some checks failed
Build Website / build (push) Failing after 1s
test
2026-04-20 09:25:21 -04:00

29 lines
No EOL
872 B
YAML

name: Build Website
on: [push]
jobs:
build:
runs-on: docker
steps:
- name: Checkout
run: |
git clone --branch ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }}.git .
- name: Prepare output directory
run: |
mkdir -p site/public
chmod 777 site/public
- name: Build
run: |
docker run --rm \
-v "$PWD/site:/src" \
-w /src \
ghcr.io/gohugoio/hugo:latest \
--minify --destination "public" --baseURL "/"
- name: Deploy
run: |
echo "${{ secrets.FORGEJO_SSH }}" > /tmp/deploy_key
chmod 600 /tmp/deploy_key
scp -i /tmp/deploy_key -o StrictHostKeyChecking=no -r site/public/. ${{ vars.JMOPINES_USER }}@${{ vars.JMOPINES_IP }}:/var/www/jmopines/
rm /tmp/deploy_key