-
Notifications
You must be signed in to change notification settings - Fork 10
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
Automatic prod deployments #8
Conversation
Add GH workflow that deploys the website app to `threshold.network`. The workflow will run on the `push` event to the `main` branch and on the `pull_request` event that targets a `main` branch. This workflow also posts preview URL to PR.
✔️ Deploy Preview for lucid-roentgen-b5d3b0 ready! 🔨 Explore the source changes: 4329bba 🔍 Inspect the deploy log: https://app.netlify.com/sites/lucid-roentgen-b5d3b0/deploys/62063faf45aff00008d067ae 😎 Browse the preview: https://deploy-preview-8--lucid-roentgen-b5d3b0.netlify.app |
✔️ Deploy Preview for agitated-bell-d01e4e ready! 🔨 Explore the source changes: 4329bba 🔍 Inspect the deploy log: https://app.netlify.com/sites/agitated-bell-d01e4e/deploys/62063faf47c6af00072ac342 😎 Browse the preview: https://deploy-preview-8--agitated-bell-d01e4e.netlify.app |
We should use `gegithub.head_ref` instead of `github.ref_name`. The `head_ref` or source branch of the pull request in a workflow run.
To manually trigger a workflow.
It should be `/${{ github.head_ref }}`. Please see 0541033.
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 webpage won't have eth environment versions like mainnet
, ropsten
. We should use production
name instead of mainnet
.
This webpage won't have eth environment versions like `mainnet`, `ropsten`. We should use `production` name instead of `mainnet`.
We just need to configure the secrets and see if it works before we merge. |
Can we clear the Edit: captured in #9 |
`secrets.PREVIEW_UPLOADER_SERVICE_KEY_JSON_BASE64` -> `secrets.PROD_PREVIEW_UPLOADER_SERVICE_KEY_JSON_BASE64` `secrets.PREVIEW_GOOGLE_PROJECT_ID` -> `secrets.PROD_PREVIEW_GOOGLE_PROJECT_ID`
.github/workflows/ci.yaml
Outdated
service-key: ${{ secrets.PREVIEW_UPLOADER_SERVICE_KEY_JSON_BASE64 }} | ||
project: ${{ secrets.PREVIEW_GOOGLE_PROJECT_ID }} |
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.
service-key: ${{ secrets.PREVIEW_UPLOADER_SERVICE_KEY_JSON_BASE64 }} | |
project: ${{ secrets.PREVIEW_GOOGLE_PROJECT_ID }} | |
service-key: ${{ secrets.PROD_PREVIEW_UPLOADER_SERVICE_KEY_JSON_BASE64 }} | |
project: ${{ secrets.PROD_PREVIEW_GOOGLE_PROJECT_ID }} |
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.
Preview uploaded to https://preview.threshold.network/prod-deployment/index.html. |
We want to have an additional step where the deployment requires manual approval so we should add environment property. Co-authored-by: Jakub Nowakowski <jakub.nowakowski@keep.network>
Preview uploaded to https://preview.threshold.network/prod-deployment/index.html. |
1 similar comment
Preview uploaded to https://preview.threshold.network/prod-deployment/index.html. |
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 like it worked 💯
Closes: #7
This PR adds a GH workflow that deploys the preview to
preview.threshold.network
on every pull request that targets tomain
branch and deploys website tothreshold.network
on push tomain
branch.