Skip to content

Merge pull request #99 from jameskimmel/patch-1 #453

Merge pull request #99 from jameskimmel/patch-1

Merge pull request #99 from jameskimmel/patch-1 #453

Workflow file for this run

name: Build & Publish
on:
push:
branches:
- v5-rework
jobs:
build:
name: Build & Publish
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: mysql, mysqlnd, sqlite3, bcmath, gd, curl, zip, openssl, mbstring, xml
- uses: actions/checkout@v2
- name: Install Composer Dependencies
run: composer install --no-interaction
- name: Install NPM Dependencies
run: npm install
- name: Build Site
run: npm run production
- name: Run Scripts
run: vendor/bin/phpunit
- name: Run node commands
run: |
cd tests
cat fr_CA.json | node build-index.js > fr_CA_index.js
cat en.json | node build-index.js > en_index.js
cp fr_CA_index.js ../build_production/
cp en_index.js ../build_production/
cp fr_CA.js ../build_production/
cp en.js ../build_production/
- name: Copy selfhost.html
run: cp source/selfhost.html build_production/
- name: Stage Files
run: git add -f build_production
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git commit -m "Build for deploy"
- name: Publish
run: |
git subtree split --prefix build_production -b master
git push -f origin master:master