This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +52
-56
lines changed Expand file tree Collapse file tree 8 files changed +52
-56
lines changed Original file line number Diff line number Diff line change 10
10
- ' docs/**'
11
11
12
12
jobs :
13
+ all_github_action_checks :
14
+ runs-on : ubuntu-latest
15
+ if : needs.check_non_docs.outputs.run_all_github_action_checks == 'true'
16
+ needs :
17
+ - check_non_docs
18
+ - build_docs
19
+ steps :
20
+ - run : echo "Done"
21
+
13
22
check_non_docs :
14
23
outputs :
15
24
run_all_github_action_checks : ${{ steps.check_files.outputs.run_all_github_action_checks }}
35
44
fi
36
45
done < files.txt
37
46
38
- all_github_action_checks :
47
+ build_docs :
39
48
runs-on : ubuntu-latest
40
- needs : check_non_docs
41
- if : needs.check_non_docs.outputs.run_all_github_action_checks == 'true'
42
49
steps :
43
- - run : echo "Done"
50
+ - uses : actions/checkout@v2
51
+ - uses : actions/setup-node@v2
52
+ with :
53
+ node-version : ' 16'
54
+ - name : " Build Docs"
55
+ run : |
56
+ cd docs/
57
+ npm ci
58
+ ./build.sh
Original file line number Diff line number Diff line change 1
- on :
1
+ name : Docs Publish
2
2
3
+ on :
3
4
push :
4
5
branches : [master]
5
- pull_request_target :
6
- branches : [master]
6
+ paths :
7
+ - ' docs/** '
7
8
8
9
jobs :
9
- build :
10
+ build :
10
11
runs-on : ubuntu-latest
11
12
steps :
12
13
- uses : actions/checkout@v2
@@ -15,15 +16,11 @@ jobs:
15
16
with :
16
17
node-version : ' 16'
17
18
name : " installing the node.js with version 16"
18
- - run : .travis/affects.sh docs/ .travis || exit 0
19
+ - name : " Build Docs "
19
20
if : ${{ github.event_name == ('push' || 'pull_request')}} && ${{github.ref == 'master'}}
20
- name : " Build Docs"
21
- - run : |
21
+ run : |
22
22
cd docs/
23
- source .travis/before_install.sh
24
23
npm ci
25
- source .travis/script .sh
24
+ ./build .sh
26
25
env :
27
26
VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
28
-
29
-
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
6
6
(
7
7
set -x
8
- git diff --name-only " $TRAVIS_COMMIT_RANGE "
8
+ git diff --name-only " $CI_BASE_BRANCH " .. " $CI_COMMIT "
9
9
)
10
10
11
- for file in $( git diff --name-only " $TRAVIS_COMMIT_RANGE " ) ; do
11
+ for file in $( git diff --name-only " $CI_BASE_BRANCH " .. " $CI_COMMIT " ) ; do
12
12
for prefix in " $@ " ; do
13
13
if [[ $file =~ ^" $prefix " ]]; then
14
14
exit 0
Original file line number Diff line number Diff line change @@ -67,6 +67,20 @@ if [[ -n $CI ]]; then
67
67
fi
68
68
export CI_REPO_SLUG=$APPVEYOR_REPO_NAME
69
69
export CI_TAG=$APPVEYOR_REPO_TAG_NAME
70
+ elif [[ -n $GITHUB_ACTIONS ]]; then
71
+ export CI_BRANCH=$GITHUB_REF
72
+ export CI_BASE_BRANCH=$GITHUB_BASE_REF
73
+ export CI_BUILD_ID=$GITHUB_RUN_ID
74
+ export CI_COMMIT=$GITHUB_SHA
75
+ export CI_JOB_ID=$GITHUB_JOB
76
+ if [[ -n $GITHUB_HEAD_REF ]]; then
77
+ export CI_PULL_REQUEST=true
78
+ else
79
+ export CI_PULL_REQUEST=
80
+ fi
81
+ export CI_OS_NAME=$RUNNER_OS
82
+ export CI_REPO_SLUG=$GITHUB_REPOSITORY
83
+ export CI_TAG=$GITHUB_REF_NAME
70
84
fi
71
85
else
72
86
export CI=
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,6 +6,15 @@ cd "$(dirname "$0")"
6
6
# shellcheck source=ci/env.sh
7
7
source ../ci/env.sh
8
8
9
+ # Publish only from merge commits and release tags
10
+ if [[ -n $CI ]]; then
11
+ if [[ -z $CI_PULL_REQUEST ]]; then
12
+ npm install --global docusaurus-init
13
+ docusaurus-init
14
+ npm install --global vercel
15
+ fi
16
+ fi
17
+
9
18
# Build from /src into /build
10
19
npm run build
11
20
You can’t perform that action at this time.
0 commit comments