Skip to content

Commit ad9d94c

Browse files
author
Aaron Waggener
committed
Test using a single job for build and deploy
1 parent f587bb1 commit ad9d94c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
name: Build
1+
name: Build and Deploy
22

33
on:
4-
pull_request:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
58

69
jobs:
710
build:
@@ -20,3 +23,14 @@ jobs:
2023
yarn install --frozen-lockfile
2124
yarn test
2225
yarn build
26+
cp -r public/* dist
27+
28+
- name: Deploy
29+
if: ${{ github.ref == 'refs/heads/main' }}
30+
uses: JamesIves/github-pages-deploy-action@4.1.5
31+
with:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
BRANCH: gh-pages
34+
FOLDER: dist
35+
BUILD_SCRIPT: yarn install && yarn test && yarn build
36+

0 commit comments

Comments
 (0)