forked from segmentio/react-example
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 799 Bytes
/
deploy.yml
File metadata and controls
34 lines (27 loc) · 799 Bytes
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
31
32
33
34
name: Deploy to GH pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "14.x"
cache: 'yarn'
- name: Installing Dependencies
run: yarn install
- name: Building App
run: yarn build
env:
REACT_APP_SEGMENT_WRITE_KEY: ${{ secrets.REACT_APP_SEGMENT_WRITE_KEY }}
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d build -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}