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

Automatic mirroring of Common.css #6

Merged
merged 17 commits into from
Nov 30, 2022
Merged

Automatic mirroring of Common.css #6

merged 17 commits into from
Nov 30, 2022

Conversation

headquarter8302
Copy link
Member

Using GitHub Actions, we can fetch data from the wiki from any URL and then commit it to the Common.css file we have. Essentially having a working automatic mirror.

The current action is as follows:

  1. Runs at 0:00 UTC every day or be dispatched manually (the most amount of time a GH Action can be automatically triggered is every 5 minutes).
  2. Checks out the repo.
  3. Sets the git user as myself, will change it to the user actions if PR passes.
  4. Fetches plaintext from https://youtube.fandom.com/wiki/MediaWiki:Common.css?action=raw.
  5. Commit it to main.

@Saurmandal
Copy link

As someone who knows nothing about auto mirroring, this is pretty cool.

@headquarter8302
Copy link
Member Author

Should we implement this?

@headquarter8302
Copy link
Member Author

It should also be noted that the Action fails when the main branch is equal to the fetched revision

@headquarter8302
Copy link
Member Author

Action now handles errors gracefully. @Saurmandal merge?

@headquarter8302 headquarter8302 merged commit 670f994 into Wikitubia:main Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants