File tree Expand file tree Collapse file tree 3 files changed +36
-7
lines changed Expand file tree Collapse file tree 3 files changed +36
-7
lines changed Original file line number Diff line number Diff line change 22
22
uses : actions/cache@v2
23
23
with :
24
24
path : ~/.npm
25
- key : v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
26
- restore-keys : v1-npm-deps-
25
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26
+ restore-keys : |
27
+ ${{ runner.os }}-node-
27
28
- run : npm ci
28
29
- run : npm install -g mongodb-runner
29
30
- run : mongodb-runner start
Original file line number Diff line number Diff line change
1
+ name : docs
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ pull_request :
7
+ branches :
8
+ - ' **'
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-18.04
12
+ timeout-minutes : 30
13
+ steps :
14
+ - name : Get Tag
15
+ id : tag
16
+ run : |
17
+ echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
18
+ - name : Generate Docs
19
+ run : |
20
+ echo $SOURCE_TAG
21
+ npm run release_docs
22
+ env :
23
+ SOURCE_TAG : ${{ steps.tag.outputs.SOURCE_TAG }}
24
+ - name : Deploy
25
+
26
+ with :
27
+ github_token : ${{ secrets.GITHUB_TOKEN }}
28
+ publish_dir : ./docs
Original file line number Diff line number Diff line change 1
1
#! /bin/sh -e
2
2
set -x
3
- if [ " ${TRAVIS_REPO_SLUG } " = " " ];
3
+ if [ " ${GITHUB_ACTIONS } " = " " ];
4
4
then
5
- echo " Cannot release docs without TRAVIS_REPO_SLUG set"
5
+ echo " Cannot release docs without GITHUB_ACTIONS set"
6
6
exit 0;
7
7
fi
8
- REPO=" https://github.com/${TRAVIS_REPO_SLUG} "
8
+ REPO=" https://github.com/parse-community/Parse-SDK-JS "
9
9
10
10
rm -rf docs
11
11
git clone -b gh-pages --single-branch $REPO ./docs
15
15
16
16
DEST=" master"
17
17
18
- if [ " ${TRAVIS_TAG } " != " " ];
18
+ if [ " ${SOURCE_TAG } " != " " ];
19
19
then
20
- DEST=" ${TRAVIS_TAG } "
20
+ DEST=" ${SOURCE_TAG } "
21
21
# change the default page to the latest
22
22
echo " <meta http-equiv='refresh' content='0; url=/Parse-SDK-JS/api/${DEST} '>" > " docs/api/index.html"
23
23
fi
You can’t perform that action at this time.
0 commit comments