2727 with :
2828 cancel_others : ' false'
2929 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"]'
3131
3232 test :
3333 needs : see_if_should_skip
4444 - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
4545 name : Check out repo
4646 uses : actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
47+ with :
48+ # Enables cloning the Early Access repo later with the relevant PAT
49+ persist-credentials : ' false'
4750
4851 - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
4952 name : Setup node
@@ -70,19 +73,19 @@ jobs:
7073 name : Install dependencies
7174 run : npm ci
7275
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' }}
7585 run : npm run build
7686
7787 - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
7888 name : Run tests
7989 run : npx jest tests/${{ matrix.test-group }}/
8090 env :
8191 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