Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit 81dca98

Browse files
authored
Create docs-deploy-gh-pages.yml
1 parent e78bc12 commit 81dca98

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: docs-deploy-gh-pages
2+
3+
on:
4+
release:
5+
push:
6+
types: [created]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
15+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
16+
ref: docs
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: 12
20+
# local changes
21+
- run: yarn --frozen-lockfile
22+
- run: yarn install
23+
- run: yarn run build:docs
24+
env:
25+
CI: false
26+
- run: rm -r -f docs
27+
- run: mkdir docs
28+
- run: cp -R build/* docs
29+
- run: git add --all
30+
# setting up git
31+
- run: git config --local user.email "action@github.com"
32+
- run: git config --local user.name "GitHub Action"
33+
- run: git commit -a -m "docs-deploy-gh-pages deployed docs."
34+
- name: Push changes
35+
uses: ad-m/github-push-action@master
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
branch: docs

0 commit comments

Comments
 (0)