@@ -9,16 +9,11 @@ permissions:
9
9
contents : write
10
10
11
11
jobs :
12
- build :
12
+ update-cli :
13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- name : Check out source
16
16
uses : actions/checkout@v3
17
- - name : Check out documentation branch
18
- uses : actions/checkout@v3
19
- with :
20
- ref : ' dist'
21
- path : ' public'
22
17
- name : Use Node.js
23
18
uses : actions/setup-node@v3
24
19
with :
@@ -44,26 +39,11 @@ jobs:
44
39
git config user.name 'npm CLI robot'
45
40
git config user.email 'npm-cli+bot@github.com'
46
41
git commit -m 'CLI documentation update from CI'
47
- - name : Build documentation
48
- run : npm run build
49
- env :
50
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
- - name : Push source changes
52
- if : steps.status.outputs.has_changes == '1'
53
- run : git push origin main
54
- - name : Check for changes to docs
55
- id : docs-status
56
- working-directory : public
57
- run : |
58
- if [ -n "$(git status --porcelain)" ]; then
59
- echo "::set-output name=has_changes::1"
60
- fi
61
- - name : Publish documentation
62
- if : steps.docs-status.outputs.has_changes == '1'
63
- working-directory : public
64
- run : |
65
- git add --verbose .
66
- git config user.name 'npm CLI robot'
67
- git config user.email 'npm-cli+bot@github.com'
68
- git commit -m 'CLI documentation update from CI'
69
- git push origin dist
42
+ git push origin main
43
+
44
+ deploy :
45
+ runs-on : ubuntu-latest
46
+ needs : update-cli
47
+ steps :
48
+ - name : Call publish workflow
49
+ uses : ./.github/workflows/publish.yml
0 commit comments