-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 895 Bytes
/
build.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
name: Build Website
on:
push:
branches:
- main
jobs:
build:
name: Build gh-page
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: 20.2.0
cache: 'npm'
- name: Install NPM Dependencies
run: npm install --omit=dev
- name: Build
run: npm run build
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "build" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-page
force: true