Skip to content

CI generated docs on scala3doc.virtuslab.com #10276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/scala3doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,28 @@ on:
push:
branches:
- master
pull_request:
pull_request_target:
jobs:
build:
runs-on: ubuntu-latest
container: lampepfl/dotty:2020-04-24

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:
Expand Down Expand Up @@ -44,3 +56,15 @@ jobs:

- name: Generate documentation for example project using dotty-sbt
run: ./project/scripts/sbt "sbt-dotty/scripted sbt-dotty/scala3doc"

- 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
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
10 changes: 6 additions & 4 deletions scala3doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,18 @@ work on the project.
For every PR, we build documentation for Scala3doc and Dotty. For example, for
PR 123 you can find them at:

- <https://scala3doc.s3.eu-central-1.amazonaws.com/pr-123/self/main/index.html>
- <https://scala3doc.s3.eu-central-1.amazonaws.com/pr-123/stdLib/main/index.html>
- <https://scala3doc.virtuslab.com/pr-123/self/main/index.html>
- <https://scala3doc.virtuslab.com/pr-123/scala3/main/index.html>
- <https://scala3doc.virtuslab.com/pr-123/testcases/main/index.html>

Note that these correspond to the contents of `output` directory - that's
precisely what they are.

You can also find the result of building the same sites for latest `master` at:

- <https://scala3doc.s3.eu-central-1.amazonaws.com/pr-master/self/main/index.html>
- <https://scala3doc.s3.eu-central-1.amazonaws.com/pr-master/stdLib/main/index.html>
- <https://scala3doc.virtuslab.com/master/self/main/index.html>
- <https://scala3doc.virtuslab.com/master/scala3/main/index.html>
- <https://scala3doc.virtuslab.com/master/testcases/main/index.html>

### Testing

Expand Down