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