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 4
4
push :
5
5
branches :
6
6
- master
7
- pull_request :
7
+ pull_request_target :
8
8
jobs :
9
9
build :
10
10
runs-on : ubuntu-latest
13
13
- name : Git Checkout
14
14
uses : actions/checkout@v2
15
15
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
+
16
29
- name : Cache Coursier
17
30
uses : actions/cache@v1
18
31
with :
48
61
uses : azure/CLI@v1
49
62
env :
50
63
AZURE_STORAGE_SAS_TOKEN : ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
64
+ PR_NUMBER : ${{ github.event.pull_request.number }}
51
65
with :
52
66
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
54
68
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
55
69
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
56
70
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