Skip to content

Commit d632bff

Browse files
committed
add docs deployment action
1 parent d3a83d4 commit d632bff

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy
2+
on:
3+
# Trigger the workflow on push or pull request,
4+
# but only for the main branch
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: Deploy ReactSketchCanvas documentation
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v2
18+
19+
- name: Use Node 14.x
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: 14.x
23+
24+
- name: Install Yarn
25+
run: npm install -g yarn
26+
27+
- name: Install deps and build (with cache)
28+
run: yarn install --frozen-lockfile --silent
29+
30+
- name: Build documentation
31+
run: yarn build:example
32+
33+
- name: Deploy Documentation 🚀
34+
uses: JamesIves/github-pages-deploy-action@4.1.4
35+
with:
36+
branch: gh-pages
37+
folder: example/build
38+
clean: true

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"last 1 firefox version",
4343
"last 1 safari version"
4444
]
45-
}
45+
},
46+
"homepage": "http://vinoth.info/react-sketch-canvas"
4647
}

0 commit comments

Comments
 (0)