-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 1 KB
/
Copy pathdeploy_gh_pages.yml
File metadata and controls
30 lines (26 loc) · 1 KB
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
name: MasterDeployCI
# Deploy React App to GitHub Pages
# https://keithweaverca.medium.com/setting-up-github-actions-for-a-react-app-on-github-pages-f66b28c312ac
# https://stackoverflow.com/questions/62495937/publish-react-app-to-github-pages-using-github-actions
# Official Docs
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context
# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install
- run: npm test
- name: deploy gh-pages
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git remote set-url origin https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }}
npm run deploy