Skip to content

Commit afd7f9e

Browse files
committed
Create publish.yml
1 parent 4ec4371 commit afd7f9e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on: [push]
2+
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
9+
- name: Set Node Version to 18
10+
uses: actions/setup-node@v2
11+
with:
12+
node-version: '18'
13+
14+
- name: Install Dependencies
15+
uses: borales/actions-yarn@v4
16+
with:
17+
cmd: install
18+
19+
- name: Build Production Bundle
20+
uses: borales/actions-yarn@v4
21+
with:
22+
cmd: build
23+
24+
- name: Push to Build Branch
25+
uses: s0/git-publish-subdir-action@develop
26+
env:
27+
REPO: self
28+
BRANCH: gh-pages # The branch name where you want to push the assets
29+
FOLDER: build # The directory where your assets are generated
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token
31+
MESSAGE: 'Build: ({sha}) {msg}' # The commit message

0 commit comments

Comments
 (0)