yamatotoma.to/.forgejo/workflows/build.yaml
tomato 20e3c059d7
All checks were successful
/ build (push) Successful in 37s
forgejo: upload generated site
2025-05-26 02:51:58 -04:00

32 lines
941 B
YAML

on:
push
jobs:
build:
runs-on: docker
container:
image: ruby:3.3
steps:
- name: Install system dependencies
run: apt-get update && apt-get install nodejs rsync -y
- uses: https://code.forgejo.org/actions/checkout@v4
- name: Install ruby dependencies
run: bundle install
- name: Build site
run: jekyll build --future --config _config.yml
- name: Deploy site
if: github.ref == 'refs/heads/main'
run: |
echo "${{ secrets.SERVER_SSH_KEY }}" >> /tmp/id_ecdsa
chmod 600 /tmp/id_ecdsa
rsync \
-e "ssh -oStrictHostKeyChecking=no -i /tmp/id_ecdsa" \
-avz --delete \
_site/ \
deploy@${{ secrets.SERVER_NAME }}:/
rm -f /tmp/id_ecdsa
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: yamatotoma.to.zip
path: _site/