File tree Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Expand file tree Collapse file tree 1 file changed +65
-0
lines changed Original file line number Diff line number Diff line change 1+ name : documentation
2+
3+ on :
4+ pull_request :
5+ branches : [documentation]
6+ push :
7+ branches : [documentation]
8+
9+ jobs :
10+ checks :
11+ if : github.event_name != 'push'
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v1
15+ - uses : actions/setup-node@v1
16+ with :
17+ node-version : ' 12.x'
18+ - name : Test Build
19+ run : |
20+ if [ -e yarn.lock ]; then
21+ yarn install --frozen-lockfile
22+ elif [ -e package-lock.json ]; then
23+ npm ci
24+ else
25+ npm i
26+ fi
27+ npm run build
28+ working-directory : website
29+ gh-release :
30+ if : github.event_name != 'pull_request'
31+ runs-on : ubuntu-latest
32+ steps :
33+ - uses : actions/checkout@v1
34+ - uses : actions/setup-node@v1
35+ with :
36+ node-version : ' 12.x'
37+ - name : Add key to allow access to repository
38+ env :
39+ SSH_AUTH_SOCK : /tmp/ssh_agent.sock
40+ run : |
41+ mkdir -p ~/.ssh
42+ ssh-keyscan github.com >> ~/.ssh/known_hosts
43+ echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
44+ chmod 600 ~/.ssh/id_rsa
45+ cat <<EOT >> ~/.ssh/config
46+ Host github.com
47+ HostName github.com
48+ IdentityFile ~/.ssh/id_rsa
49+ EOT
50+ - name : Release to GitHub Pages
51+ env :
52+ USE_SSH : true
53+ GIT_USER : git
54+ run : |
55+ git config --global user.email "actions@gihub.com"
56+ git config --global user.name "gh-actions"
57+ if [ -e yarn.lock ]; then
58+ yarn install --frozen-lockfile
59+ elif [ -e package-lock.json ]; then
60+ npm ci
61+ else
62+ npm i
63+ fi
64+ npx docusaurus deploy
65+ working-directory : website
You can’t perform that action at this time.
0 commit comments