Skip to content

update demo

update demo #37

Workflow file for this run

name: Build & Deploy
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-20.04
if: "! contains(github.event.head_commit.message, 'wip')"
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install PHP dependencies
run: php -v && composer install --prefer-dist --no-progress
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Build site
env:
TORCHLIGHT_API_TOKEN: ${{ secrets.TORCHLIGHT_API_TOKEN }}
run: |
npm install
npm run prod
- name: Commit /build_production
run: |
git config --global user.email "julien@julienbourdeau.com"
git config --global user.name "GitHub Actions"
git add -f build_production
git commit -m 'Build static site'
- name: Push to static branch
run: git push origin $(git subtree split --prefix build_production master):static --force