Skip to content

Commit ad17a28

Browse files
committed
Run doc on community build over CI
1 parent db5da88 commit ad17a28

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/scala3doc.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,36 @@ jobs:
6262
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
6363
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
6464
az storage blob sync -s scala3doc/output -c $DOC_DEST --account-name scala3docstorage
65+
66+
community-docs:
67+
env:
68+
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
69+
runs-on: ubuntu-latest
70+
if: "github.event_name == 'pull_request' || contains(github.event.ref, 'scala3doc') || contains(github.event.ref, 'master')"
71+
72+
steps:
73+
- name: Git Checkout
74+
uses: actions/checkout@v2
75+
76+
- name: Set up JDK 8
77+
uses: actions/setup-java@v1
78+
with:
79+
java-version: 8
80+
81+
- name: Init submodules
82+
run: git submodule update --init --recursive --jobs 7
83+
84+
- name: Generate docs
85+
run: ./project/scripts/sbt "community-build/run doc all docsOutput"
86+
87+
- name: Upload documentation to server
88+
uses: azure/CLI@v1
89+
if: env.AZURE_STORAGE_SAS_TOKEN
90+
env:
91+
PR_NUMBER: ${{ github.event.pull_request.number }}
92+
with:
93+
inlineScript: |
94+
DOC_DEST=pr-${PR_NUMBER:-${GITHUB_REF##*/}}-docs
95+
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
96+
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
97+
az storage blob sync -s community-build/docsOutput -c $DOC_DEST --account-name scala3docstorage

0 commit comments

Comments
 (0)