-
Notifications
You must be signed in to change notification settings - Fork 1.2k
79 lines (65 loc) · 2.48 KB
/
scala3doc.yaml
File metadata and controls
79 lines (65 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI for Scala3doc
on:
push:
branches:
- master
pull_request_target:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Checkout to PR code
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run : |
if [[ -z "${PR_NUMBER}" ]]; then
echo Not a pull request do not need to checkout
else
REF=refs/pull/$PR_NUMBER/merge
echo checking $REF
git fetch origin $REF:$REF
git checkout $REF
fi
- name: Cache Coursier
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: sbt-coursier-cache
- name: Cache SBT
uses: actions/cache@v1
with:
path: ~/.sbt
key: sbt-${{ hashFiles('**/build.sbt') }}
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Compile and test
run: ./project/scripts/sbt scala3doc/test
- name: Locally publish self
run: ./project/scripts/sbt scala3doc/publishLocal
- name: Generate self documentation
run: ./project/scripts/sbt scala3doc/generateSelfDocumentation
- name: Generate testcases documentation
run: ./project/scripts/sbt scala3doc/generateTestcasesDocumentation
- name: Generate Scala 3 documentation
run: ./project/scripts/sbt scala3doc/generateScala3Documentation
- name: Generate Scala 3 stdlib documentation
run: ./project/scripts/sbt scala3doc/generateScala3StdlibDocumentation
- name: Generate documentation for example project using dotty-sbt
run: ./project/scripts/sbt "sbt-dotty/scripted sbt-dotty/scala3doc"
- name: Generate index file
run: scala3doc/scripts/mk-index.sh scala3doc/output > scala3doc/output/index.html
- name: Upload documentation to server
uses: azure/CLI@v1
env:
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
with:
inlineScript: |
DOC_DEST=pr-${PR_NUMBER:-master}
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
az storage blob sync -s scala3doc/output -c $DOC_DEST --account-name scala3docstorage