31 lines
793 B
YAML
31 lines
793 B
YAML
|
|
name: Build Eleventy Site
|
||
|
|
|
||
|
|
on: [push]
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
build:
|
||
|
|
runs-on: docker
|
||
|
|
container:
|
||
|
|
image: node:18
|
||
|
|
|
||
|
|
steps:
|
||
|
|
- name: Checkout code
|
||
|
|
run: |
|
||
|
|
git clone --branch ${{ github.ref }} ${{ github.server_url }}/${{ github.repository }} .
|
||
|
|
|
||
|
|
- 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
|