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

Conversation

romanowski
Copy link
Contributor

From scala3doc. It includes documentation for dotty, scala3doc and scala3doc-testcases

This PR requires a secret AZURE_STORAGE_SAS_TOKEN to be added to work.

@romanowski romanowski marked this pull request as draft November 11, 2020 01:28
@romanowski
Copy link
Contributor Author

Confoguration works on my private fork where I can control secrets.
See example build and generated documentation

@smarter
Copy link
Member

smarter commented Nov 11, 2020

Could we upload to github pages like we do for the existing docs?

@romanowski
Copy link
Contributor Author

Could we upload to github pages like we do for the existing docs?

Once we switch to scala3doc by default we will do that for sure.

The main goal for this PR is to have generated documentation for development of scala3doc similar to what we've got on scala3doc

@abgruszecki
Copy link
Contributor

@romanowski it seems we have hit a problem. I've added the secret you've sent me, but it seems that GH simply refuses to pass secrets to workflows ran from a fork, which is the default workflow for us here in Dotty land. GH docs don't suggest any workaround. A quick Google search didn't help either. I think we could try to embed the secret inside our container, but that's a bit painful to maintain. Any other suggestions?

@smarter
Copy link
Member

smarter commented Nov 11, 2020

Merge scala3doc.yaml and ci.yaml into one file?

@abgruszecki
Copy link
Contributor

@smarter I guess we can do that, but I don't understand how that is supposed to help?

@smarter
Copy link
Member

smarter commented Nov 11, 2020

I thought from what you said that the issue was due to using a different workflow?

@abgruszecki
Copy link
Contributor

The problem is that the PR references a branch on a fork of Dotty repo, which is what dotty-staging/dotty is. Workflows ran on such a PR don't get to see any secrets, not even ones in the fork apparently.

From scala3doc. It includes documentation for dotty, scala3doc and scala3doc-testcases
@romanowski romanowski force-pushed the scala3doc/upload-doc-after-ci branch 2 times, most recently from 7a6fd04 to a9e45ce Compare November 11, 2020 14:00
And then switch to PR code to utilize secrets from main repository
@romanowski romanowski force-pushed the scala3doc/upload-doc-after-ci branch from a9e45ce to 7167640 Compare November 11, 2020 14:00
@romanowski romanowski marked this pull request as ready for review November 11, 2020 14:25
@romanowski
Copy link
Contributor Author

I've changed apporach and now we are now using pull_request_target trigger that runs checks on target branch on PR (I checkout to PR code) and its allow it to use secrets.

It means that is uses CI configuration from target branch and to see how it will work when merged I create this PR where this branch is a PR target.

@abgruszecki
Copy link
Contributor

Trigger for the workflow was changed to pull_request_target, which uses config from PR target and so, has available secrets. This PR was tested in another repo here: VirtusLab#4, so it LGTM.

@abgruszecki abgruszecki merged commit e8da5c8 into scala:master Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants