-
Notifications
You must be signed in to change notification settings - Fork 13
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
add deploy preview workflow #904
Conversation
💻 Deploy preview available: https://deploy-preview-writers-toolkit-904-zb444pucvq-vp.a.run.app/docs/writers-toolkit/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an absolutely incredible feature. Thank you so much for implementing it.
I know you've worked with the Platform team already but I'd like to see if I get one of them to take a look through to check for Actions best practices, primarily from a security perspective, so that we can confidently propagate this across other repositories.
docker run -v ${PWD}/dist:/hugo/dist -v "${PWD}/${{ inputs.source_directory }}:/hugo/${{ inputs.website_directory }}" --rm grafana/docs-base:latest /bin/bash -c 'HUGO_SSI=false hugo --environment=docs --destination=dist/ --baseURL= --minify' | ||
printf "%s" "add_header 'Build' '"${{ inputs.sha }}"';" > build.conf | ||
|
||
- uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you use https://github.com/grafana/shared-workflows/tree/main/actions/push-to-gar-docker for this and the following steps without requiring a custom service account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service account in login-to-gar (https://github.com/grafana/shared-workflows/blob/main/actions/login-to-gar/action.yaml#L27), which is called from push-to-gar
, is hard coded from the output of the construct-service-account
step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to explore this in a follow up. I don't mind that the same service account handles all the aspects of this service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service account in the shared-workflow is currently just an implementation detail and IIRC @dsotirakis is investigating if we can completely get rid of it 🙂 That was the main reason for me asking about this here but it's absolutely not required 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service account in the shared-workflow is currently just an implementation detail and IIRC @dsotirakis is investigating if we can completely get rid of it 🙂 That was the main reason for me asking about this here but it's absolutely not required 🙂
Good to know! I'm subscribed to all activity on the grafana/shared-workflows repository so if something moves there, we'll know :)
Thanks for clarifying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to come back and update if we can get rid of it!
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks so good man!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for porting this over ❤️
for https://github.com/grafana/website/issues/10101
This PR deploys a publicly available preview of the output of the
make docs
command for pull requests. The preview is then deleted when the PR is merged or closed.To test
The output should be the same commit sha as the commit you pushed.
Before merge todo: