update dependencies #437
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Publish | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "0 2 * * 1-5" | |
jobs: | |
build-site: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
fetch-depth: 0 | |
- name: Setup PHP 8.4 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.4 | |
tools: composer:v2 | |
- name: Setup Node 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Composer Dependencies | |
run: composer install --no-ansi --no-interaction --ignore-platform-reqs --no-scripts --no-suggest --no-progress --prefer-dist | |
- name: Install NPM Dependencies | |
run: npm install | |
- name: Build assets | |
run: npm run production | |
- name: Build Jigsaw site | |
run: ./vendor/bin/jigsaw build production | |
- name: Create CNAME File | |
run: echo "recipes.milon.im" >> build_production/CNAME | |
- name: Stage Files | |
run: git add -f build_production | |
- name: Commit files | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git commit -m "Build for deploy" | |
- name: Publish | |
run: | | |
git subtree split --prefix build_production -b gh-pages | |
git push -f origin gh-pages:gh-pages | |
git branch -D gh-pages |