Skip to content

Update demo

Update demo #30

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@v3
- 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@v3
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