-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.25 KB
/
deploy.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
name: Deploy Jigsaw site to GitHub Pages
on:
# Runs on pushes targeting default branch
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install Composer Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install NPM Dependencies
run: npm ci
- name: Build Site
run: npm run production
- name: Create CNAME File
run: echo "phpbali.org" >> build_production/CNAME
- 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 gh-pages
git push -f origin gh-pages:gh-pages
git branch -D gh-pages