File tree Expand file tree Collapse file tree 5 files changed +991
-849
lines changed Expand file tree Collapse file tree 5 files changed +991
-849
lines changed Original file line number Diff line number Diff line change 12
12
check-docs :
13
13
14
14
runs-on : ubuntu-latest
15
+ if : github.repository == 'ExpediaGroup/graphql-kotlin'
15
16
16
17
steps :
17
18
- uses : actions/checkout@v2
21
22
with :
22
23
node-version : 12
23
24
24
- - name : Run npm commands
25
- if : github.repository == 'ExpediaGroup/graphql-kotlin'
25
+ - uses : actions/cache@v1
26
+ with :
27
+ path : ~/.npm
28
+ key : ${{ runner.os }}-node-${{ hashFiles('website/package-lock.json') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-node-
31
+
32
+ - name : Build website
26
33
run : |
27
34
cd website
28
35
npm install
Original file line number Diff line number Diff line change 12
12
publish-docs :
13
13
14
14
runs-on : ubuntu-latest
15
+ if : github.repository == 'ExpediaGroup/graphql-kotlin'
15
16
16
17
steps :
17
18
- uses : actions/checkout@v2
@@ -21,18 +22,23 @@ jobs:
21
22
with :
22
23
node-version : 12
23
24
24
- - name : Run npm commands
25
- if : github.repository == 'ExpediaGroup/graphql-kotlin'
25
+ - uses : actions/cache@v1
26
+ with :
27
+ path : ~/.npm
28
+ key : ${{ runner.os }}-node-${{ hashFiles('website/package-lock.json') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-node-
31
+
32
+ - name : Build website
26
33
run : |
27
34
cd website
28
35
npm install
29
- git config --global user.name "${GH_USERNAME}"
30
- echo "machine github.com login ${GH_USERNAME} password ${{ secrets.EG_CI_USER_TOKEN }}" > ~/.netrc
31
- GIT_USER="${GH_USERNAME}" npm run publish-gh-pages
32
- env :
33
- CI : true
34
- CURRENT_BRANCH : master
35
-
36
- # The following settings will only work with the personal access token we are using
37
- # Until GH Actions have a way to publish directly we are using this method
38
- GH_USERNAME : eg-oss-ci
36
+ npm run build
37
+
38
+ - name : Deploy GitHub Pages
39
+ uses : peaceiris/actions-gh-pages@v3
40
+ with :
41
+ github_token : ${{ secrets.GITHUB_TOKEN }}
42
+ publish_dir : ./build
43
+ user_name : eg-oss-ci
44
+
You can’t perform that action at this time.
0 commit comments