-
Notifications
You must be signed in to change notification settings - Fork 98
Rework new deploy script into single script & add scheduled redeploy #1950
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
Conversation
Should run every Monday at 00:00 UTC
mbergen
left a comment
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.
LGTM
Co-authored-by: mbergen <mail@mbergen.de>
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
deploy.sh
Outdated
| wiki="${BASH_REMATCH[1]}" | ||
| page="${BASH_REMATCH[2]}" | ||
|
|
||
| if [[ ! ($wikiBaseUrl == "${lpBaseUrl}" || "${devWikis[*]}" =~ ${wiki}) ]]; then |
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 order of operations here is confusing tbh, can this be put in parentheses?
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.
Is it better now or did you mean something else?
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
* Add TF wiki * Modify `./` handling * Move URLs to secrets * Clarify `if` statement
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
|
All changes have been tested in my repo fork but as always, it's possible I did miss something. |
Rathoz
left a comment
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.
LGTM, think there's potential for improvements around the dev wiki handling, but we that can be put to a later date
Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
Yeah FO had suggested something like |
Works for me |
FO-nTTaX
left a comment
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 think this is good to go now
https://en.wikipedia.org/wiki/Getopts#Using_Linux_getopt In case you ever want to know how to do it |
* Update deploy.yml * Update deploy.sh * Update deploy.yml * Update deploy_dev.yml * Update deploy_dev.sh * Update deploy.yml * Update deploy_dev.yml * Finalize deploy changes * code style * fix for multi-file changing commits * remove double space * action will potentially fail without this * action will potentially fail without this * Rework new deploy script into single script & add scheduled redeploy (#1950) * Merge dev stuff into combined deploy * Delete deploy_dev.sh * Merge deploy actions * Add scheduled deploy action Should run every Monday at 00:00 UTC * Update deploy.yml * fix swapped env blocks * Fix incorrect script call Co-authored-by: mbergen <mail@mbergen.de> * Update cron times Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Only run bash script if files have been modified Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Further only run bash script if files have been modified Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Apply all suggestions/requests * Add TF wiki * Modify `./` handling * Move URLs to secrets * Clarify `if` statement * Throw error is MW API doesn't return Success * Bump version Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Swap around if statement Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> Co-authored-by: mbergen <mail@mbergen.de> Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> Co-authored-by: mbergen <mail@mbergen.de> Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
* Update deploy.yml * Update deploy.sh * Update deploy.yml * Update deploy_dev.yml * Update deploy_dev.sh * Update deploy.yml * Update deploy_dev.yml * Finalize deploy changes * code style * fix for multi-file changing commits * remove double space * action will potentially fail without this * action will potentially fail without this * Rework new deploy script into single script & add scheduled redeploy (#1950) * Merge dev stuff into combined deploy * Delete deploy_dev.sh * Merge deploy actions * Add scheduled deploy action Should run every Monday at 00:00 UTC * Update deploy.yml * fix swapped env blocks * Fix incorrect script call Co-authored-by: mbergen <mail@mbergen.de> * Update cron times Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Only run bash script if files have been modified Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Further only run bash script if files have been modified Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Apply all suggestions/requests * Add TF wiki * Modify `./` handling * Move URLs to secrets * Clarify `if` statement * Throw error is MW API doesn't return Success * Bump version Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Swap around if statement Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> Co-authored-by: mbergen <mail@mbergen.de> Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> Co-authored-by: mbergen <mail@mbergen.de> Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
* Update deploy.yml * Update deploy.sh * Update deploy.yml * Update deploy_dev.yml * Update deploy_dev.sh * Update deploy.yml * Update deploy_dev.yml * Finalize deploy changes * code style * fix for multi-file changing commits * remove double space * action will potentially fail without this * action will potentially fail without this * Rework new deploy script into single script & add scheduled redeploy (#1950) * Merge dev stuff into combined deploy * Delete deploy_dev.sh * Merge deploy actions * Add scheduled deploy action Should run every Monday at 00:00 UTC * Update deploy.yml * fix swapped env blocks * Fix incorrect script call Co-authored-by: mbergen <mail@mbergen.de> * Update cron times Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Only run bash script if files have been modified Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Further only run bash script if files have been modified Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Apply all suggestions/requests * Add TF wiki * Modify `./` handling * Move URLs to secrets * Clarify `if` statement * Throw error is MW API doesn't return Success * Bump version Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> * Swap around if statement Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> Co-authored-by: mbergen <mail@mbergen.de> Co-authored-by: Rikard Blixt <rikardblixt@gmail.com> Co-authored-by: mbergen <mail@mbergen.de> Co-authored-by: Rikard Blixt <rikardblixt@gmail.com>
Summary
Continuing the previous PR forward into the discussed merge of shell scripts into one. Plus adding scheduled deploy action once a week.
Things of note
curlrequests since it was just easier and it doesn't break anything. Idk if you guys want to only have them there if it's dev wiki but I didn't know of a clean and easy way to do it, so I left them for now.ifstatement around therm cookie_*at the end because it would throw an error otherwise when they didn't exist due to no lua files being modified.How did you test this change?
Tested on my fork of the repo as usual.
Scheduled script seems to work:

Dev wiki deployment also works:

http://darkrai.wiki.tldev.eu/commons/index.php?title=Module:Testing&action=history
So, I'm sure full wiki deploy would also work but I just didn't give it any MediaWiki credentials so the API returned that I wasn't authorized to make those changes:
