27
27
with :
28
28
cancel_others : ' false'
29
29
github_token : ${{ github.token }}
30
- paths : ' [".github/workflows/test.yml",".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
30
+ paths : ' [".github/workflows/test.yml", ".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
31
31
32
32
test :
33
33
needs : see_if_should_skip
44
44
- if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
45
45
name : Check out repo
46
46
uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
47
+ with :
48
+ # Enables cloning the Early Access repo later with the relevant PAT
49
+ persist-credentials : ' false'
47
50
48
51
- if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
49
52
name : Setup node
@@ -70,19 +73,19 @@ jobs:
70
73
name : Install dependencies
71
74
run : npm ci
72
75
73
- - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
74
- name : Run build script
76
+ - name : Clone early access
77
+ if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
78
+ run : npm run heroku-postbuild
79
+ env :
80
+ DOCUBOT_REPO_PAT : ${{ secrets.DOCUBOT_REPO_PAT }}
81
+ GIT_BRANCH : ${{ github.ref }}
82
+
83
+ - name : Run build script
84
+ if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
75
85
run : npm run build
76
86
77
87
- if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
78
88
name : Run tests
79
89
run : npx jest tests/${{ matrix.test-group }}/
80
90
env :
81
91
NODE_OPTIONS : ' --max_old_space_size=4096'
82
-
83
- - name : Send Slack notification if workflow fails
84
- uses : rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
85
- if : failure() && github.ref == 'early-access'
86
- env :
87
- SLACK_WEBHOOK : ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
88
- SLACK_MESSAGE : ' Tests are failing on the `early-access` branch.'
0 commit comments