devon.lol/.forgejo/workflows/build-eleventy.yaml

36 lines
909 B
YAML
Raw Normal View History

2025-02-07 21:39:15 -05:00
name: Build Eleventy Site
on: [push]
2025-03-03 19:12:50 -05:00
env:
WEBMENTIONSIO_TOKEN: ${{ secrets.WEBMENTIONSIO_TOKEN }}
2025-02-07 21:39:15 -05:00
jobs:
build:
runs-on: docker
container:
image: node:18
steps:
- name: Checkout code
run: |
git clone ${{ github.server_url }}/${{ github.repository }} .
git fetch origin ${{ github.ref }}
git checkout FETCH_HEAD
- name: Install dependencies
run: npm install
- name: Build Eleventy site
run: npm run build # Adjust this command if your build command is different
- name: Move built site
run: |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
mv _site/* /media/Media/apps/personal-site/prod/
echo "Running webmention..."
webmention dist/feed.xml --send
else
mv _site/* /media/Media/apps/personal-site/staging/
fi