File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131
3232 test :
3333 needs : see_if_should_skip
34- runs-on : ubuntu-latest
34+ # Run on self-hosted if the private repo or ubuntu-latest if the public repo
35+ # See pull # 17442 in the private repo for context
36+ runs-on : ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
3537 timeout-minutes : 60
3638 strategy :
3739 fail-fast : false
@@ -72,15 +74,15 @@ jobs:
7274 name : Install dependencies
7375 run : npm ci
7476
75- - name : Clone early access
76- if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
77+ - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
78+ name : Clone early access
7779 run : npm run heroku-postbuild
7880 env :
7981 DOCUBOT_REPO_PAT : ${{ secrets.DOCUBOT_REPO_PAT }}
8082 GIT_BRANCH : ${{ github.ref }}
8183
82- - name : Run build script
83- if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
84+ - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
85+ name : Run build script
8486 run : npm run build
8587
8688 - if : ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ const earlyAccessRepoName = 'docs-early-access'
4949const earlyAccessDirName = 'early-access'
5050const earlyAccessFullRepo = `https://${ DOCUBOT_REPO_PAT } @github.com/${ earlyAccessOwner } /${ earlyAccessRepoName } `
5151
52- const earlyAccessCloningParentDir = os . tmpdir ( )
52+ // On our Azure self-hosted runners, os.tmpdir() doesn't work reliably. On Heroku, os.homedir doesn't work reliably.
53+ const earlyAccessCloningParentDir = process . env . CI ? os . homedir ( ) : os . tmpdir ( )
5354const earlyAccessCloningDir = path . join ( earlyAccessCloningParentDir , earlyAccessRepoName )
5455
5556const destinationDirNames = [ 'content' , 'data' , 'assets/images' ]
You can’t perform that action at this time.
0 commit comments