1
0
2025-03-05 22:28:59 +01:00

33 lines
866 B
YAML

name: 11ty build and deploy for alex.portfolio
run-name: 11ty build and deploy for alex.portfolio
on:
push:
branches: [ 'main' ]
jobs:
build-deploy:
runs-on: node-22
container:
volumes:
- /var/www:/www
steps:
- name: Clone code to runner
uses: actions/checkout@v4
- name: Move to directory
run: cd ${{ gitea.workspace }}
- name: Install dependencies
run: npm i
- name: Build 11ty site
run: npm run build
- name: Create folder if needed
run: if [ ! -d /www/${{ gitea.event.repository.name }} ]; then mkdir /www/${{ gitea.event.repository.name }}; fi
- name: Copy built website
run: cp -r dist/. /www/${{ gitea.event.repository.name }}
- name: Fix ownership
run: chown -R www-data:www-data /www/${{ gitea.event.repository.name }}