Skip to content

Commit 0dda309

Browse files
authored
Merge pull request #1 from react-querybuilder/gh-actions-publish
GitHub Actions to deploy on push or merge to main
2 parents 0559757 + 494bd63 commit 0dda309

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: publish
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
checks:
11+
if: github.event_name != 'push'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '14.x'
18+
- name: Test Build
19+
run: |
20+
yarn install --frozen-lockfile
21+
npm run build
22+
gh-release:
23+
if: github.event_name != 'pull_request'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v1
27+
- uses: actions/setup-node@v1
28+
with:
29+
node-version: '14.x'
30+
- uses: webfactory/ssh-agent@v0.5.0
31+
with:
32+
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
33+
- name: Release to GitHub Pages
34+
env:
35+
USE_SSH: true
36+
GIT_USER: git
37+
run: |
38+
git config --global user.email "jakeboone02@gmail.com"
39+
git config --global user.name "Jake Boone"
40+
yarn install --frozen-lockfile
41+
npm run deploy

0 commit comments

Comments
 (0)