Skip to content

Commit ed3ca46

Browse files
committed
Run doc on community build over CI
1 parent c829e97 commit ed3ca46

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

0 commit comments

Comments
 (0)