Add Forgejo action for build/deploy
Some checks failed
Build Eleventy Site / build (push) Failing after 3s
Some checks failed
Build Eleventy Site / build (push) Failing after 3s
This commit is contained in:
parent
08a280fd92
commit
d5c75d19e0
1 changed files with 32 additions and 0 deletions
32
.forgejo/workflows/build-eleventy.yaml
Normal file
32
.forgejo/workflows/build-eleventy.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
name: Build Eleventy Site
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
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 ${{ github.ref }}
|
||||||
|
|
||||||
|
- 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue