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

Ci/optimize site deployment #336

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

f-hollow
Copy link
Collaborator

@f-hollow f-hollow commented Nov 20, 2024

Description

This PR does some cleanup:

  • Awesome pages are removed, no plans to use them for now
  • Comments in the workflows are cleaned up
  • Some workflows are limited to running only in this repo and not fork repos

However, the main change in this PR is the addition of a cron job to redeploy the portal every midnight at 0:05 AM (UTC time). There are two reasons for that:

  • As we are likely to merge articles with publication dates in the future, this cron job will allow us to publish such articles automatically once the designated date comes.
  • The deployment time from CI to our S3 bucket is currently around 2 minutes. We want to use the cron-deploy-hugo-website workflow to redeploy all files and reduce the deploy time in the deploy-hugo-site workflow by copying only the changed files in a merged PR as opposed to all almost all the files due to updated timestamps.
    • Implementing the upload of only changed files proved to be challenging due to the issues described in Issues syncing files. As a result, both deploy-hugo-website and cron-deploy-hugo-website will redeploy all files for the time being. The current deployment time of 2 minutes is still acceptable, so we can return to this feature when the upload time becomes less tolerable.

Issues syncing files #

The aws s3 sync command apparently compares files according to their timestamp and size. There are numerous threads where users discuss this and suggest that the sync should be based on the file hashes.

One common workaround suggested by users is to use the sync option --size-only, however, others warn that it might be a bad idea.

The workarounds in this issue and on stachoverflow might be worth implementing, but it will add complexity. As suggested above, we can return to this issue when the deploy time becomes less tolerable.

@f-hollow f-hollow force-pushed the ci/optimize_site_deployment branch from aeaf887 to 1309b7d Compare November 20, 2024 07:03
@f-hollow
Copy link
Collaborator Author

@marekmatej Thank you for your feedback regarding the awesome pages!

@pedrominatel pedrominatel merged commit e7563d0 into espressif:main Nov 21, 2024
3 checks passed
@f-hollow f-hollow mentioned this pull request Dec 9, 2024
6 tasks
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.

2 participants