Skip to content

Commit 6007527

Browse files
committed
Commit
1 parent dc8235b commit 6007527

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/build_site.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build the docs
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
18+
strategy:
19+
matrix:
20+
node-version: [16.x]
21+
22+
steps:
23+
- name: Checkout main branch 🛎️
24+
uses: actions/checkout@v4
25+
26+
- name: Use Node.js ${{ matrix.node-version }} ⚙️
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install and Build Frontend 🏗️
32+
run: |
33+
npm install
34+
npm run build
35+
36+
- name: Commit and Push to Deploy Branch 🚀
37+
run: |
38+
git config --global user.name 'github-actions[bot]'
39+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
40+
git checkout -B deploy
41+
git add .
42+
git add -f public
43+
git commit -m "${{ github.sha }} [Run webpack for commit]" || echo "No changes to commit"
44+
git push -f origin deploy

0 commit comments

Comments
 (0)