Skip to content
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

Enable website publishing in CI #75

Merged
merged 2 commits into from
Jan 7, 2024
Merged

Conversation

danicheg
Copy link
Collaborator

@danicheg danicheg commented Jan 7, 2024

No description provided.

@danicheg danicheg added the docs Relates to any documentation of the project — microsite, readme, etc label Jan 7, 2024
- name: Publish ${{ github.ref }}
run: sbt docs/docusaurusPublishGhpages
env:
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I lack access to this part of the repo's settings in Github, so I need some assistance setting this token up https://scalameta.org/mdoc/docs/docusaurus.html#deploy-key Maybe @SethTisue can do that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the steps, accurately I hope :-)

@SethTisue SethTisue merged commit e9c08af into scalacenter:main Jan 7, 2024
4 checks passed
@SethTisue
Copy link
Collaborator

https://github.com/scalacenter/scalac-profiling/actions/runs/7441157666/job/20242939961 was automatically triggered when I merged this, but it seems to have failed for reasons I don't understand. @danicheg any insight?

@danicheg
Copy link
Collaborator Author

danicheg commented Jan 8, 2024

@SethTisue Thank you!
In the logs, I see this

Cloning into 'scalac-profiling-gh-pages'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Have you enabled the Allow write access in the settings as specified in docs?
Also, maybe env var is something different from GITHUB_DEPLOY_KEY?
As yet another idea, this might be related to this paragraph from docs — It's important to use an empty passphrase so that the CI can install the key.

@danicheg danicheg deleted the ci-website branch January 8, 2024 07:08
@SethTisue
Copy link
Collaborator

I did use an empty passphrase.

You mean GIT_DEPLOY_KEY, not GITHUB_DEPLOY_KEY. It appears correct to me at https://github.com/scalacenter/scalac-profiling/settings/secrets/actions

Have you enabled the Allow write access in the settings as specified in docs?

Yes, at https://github.com/scalacenter/scalac-profiling/settings/keys I see it says "Read/write"

Maybe the clone is failing because the gh-pages branch doesn't exist yet? Maybe you need to create it first?

@danicheg
Copy link
Collaborator Author

danicheg commented Jan 8, 2024

Maybe the clone is failing because the gh-pages branch doesn't exist yet?

Screenshot 2024-01-08 at 19 12 54

(It's there already)

@danicheg
Copy link
Collaborator Author

danicheg commented Jan 8, 2024

You mean GIT_DEPLOY_KEY, not GITHUB_DEPLOY_KEY. It appears correct to me at https://github.com/scalacenter/scalac-profiling/settings/secrets/actions

I cannot visit that page. But just to confirm, you've set up the GIT_DEPLOY_KEY env var, right? If so it might be the reason, because in CI, I expected this one ${{ secrets.GITHUB_DEPLOY_KEY }}

@SethTisue
Copy link
Collaborator

Yes, that must be the problem. I used GIT_DEPLOY_KEY because that's what https://scalameta.org/mdoc/docs/docusaurus.html#deploy-key suggested.

Hopefully #77 will fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Relates to any documentation of the project — microsite, readme, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants