-
Notifications
You must be signed in to change notification settings - Fork 268
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
Simplify website deployment workflows #1404
Conversation
355d77a
to
eec2cd7
Compare
There were some SSH and pathing errors, but those are fixed now. This update was used to deploy to a staging site: This is ready for review. |
@@ -6,6 +6,11 @@ on: | |||
schedule: | |||
- cron: '0 9,18 * * *' | |||
|
|||
concurrency: | |||
group: website-deployment |
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 ensures that only one website deployment workflow can run at a time.
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 code looks good to me, but I didn't run the workflow.
@@ -6,6 +6,11 @@ on: | |||
schedule: | |||
- cron: '0 9,18 * * *' | |||
|
|||
concurrency: | |||
group: website-deployment | |||
# TODO: Enable cancel-in-progress once we are deploying per commit? |
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.
I'd let it finish – stopping the deployment halfway through or when the apply-update.sh
is running sounds like trouble. If we push 5 commits in rapid progression, though, perhaps this could only run for the first and the fifth, but not for anything in between?
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.
I'd let it finish – stopping the deployment halfway through or when the apply-update.sh is running sounds like trouble.
Good point.
If we push 5 commits in rapid progression, though, perhaps this could only run for the first and the fifth, but not for anything in between?
That's my understanding: There can be one workflow instance active and one pending. If another becomes pending, it replaces the previous pending workflow.
Noting that this PR has put documentation out of sync: How do users download pre-built artifacts to self-host? |
Is there a new way to download pre-built artifacts for self hosting? I followed the docs but they're no longer relevant due to this PR. |
What is this PR doing?
This PR simplifies website deployment workflows.
What problem is it solving?
Now that we are pushing built website files directly to WP Cloud, there is no longer any need to run deployment as a two-workflow process. It means we can just push the build directly rather than having to save it as a build artifact that is downloaded by the next workflow.
How is the problem addressed?
This PR merges the relevant steps from the second workflow into the first and deletes a lot of unnecessary code.
Testing Instructions
Test via workflow instrumentation and temporary changes to deploy to a staging site:
https://wordpress-playground-staging.atomicsites.blog