File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7- pull_request :
7+ pull_request_target :
88jobs :
99 build :
1010 runs-on : ubuntu-latest
1313 - name : Git Checkout
1414 uses : actions/checkout@v2
1515
16+ - name : Checkout to PR code
17+ env :
18+ PR_NUMBER : ${{ github.event.pull_request.number }}
19+ run : |
20+ if [[ -z "${PR_NUMBER}" ]]; then
21+ echo Not a pull request do not need to checkout
22+ else
23+ REF=refs/pull/$PR_NUMBER/merge
24+ echo checking $REF
25+ git fetch origin $REF:$REF
26+ git checkout $REF
27+ fi
28+
1629 - name : Cache Coursier
1730 uses : actions/cache@v1
1831 with :
4861 uses : azure/CLI@v1
4962 env :
5063 AZURE_STORAGE_SAS_TOKEN : ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
64+ PR_NUMBER : ${{ github.event.pull_request.number }}
5165 with :
5266 inlineScript : |
53- DOC_DEST=$([ $GITHUB_REF = "refs/heads/master" ] && echo master || echo pr-$(echo $GITHUB_REF | cut '-d/' -f3))
67+ DOC_DEST=pr-$PR_NUMBER
5468 echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
5569 az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
5670 az storage blob sync -s scala3doc/output -c $DOC_DEST --account-name scala3docstorage
You can’t perform that action at this time.
0 commit comments