-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.22 KB
/
build-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 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