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

Document how style updates are deployed #23

Open
peterjc opened this issue May 23, 2019 · 14 comments
Open

Document how style updates are deployed #23

peterjc opened this issue May 23, 2019 · 14 comments

Comments

@peterjc
Copy link
Member

peterjc commented May 23, 2019

Currently any changes to the style made here on GitHub require manual upload to the server to go live. We should document this, perhaps in the README.md (bus factor etc).

This was referenced May 23, 2019
@nlharris
Copy link
Member

+1

@hlapp
Copy link
Member

hlapp commented May 27, 2019

I have configured the obf-new theme directory on Wordpress now as a git repo clone of sorts off the master branch. Can someone (@peterjc, @nlharris, @yochannah?) check and green light whether the results include all the recent changes?

If yes, we would just need a cron job that does a git pull regularly, perhaps every night or something?

@hlapp
Copy link
Member

hlapp commented May 27, 2019

And FYI, I say clone of sorts above because it is not simply a clone, but the repo contents overlaid over what WP had put there itself.

It turns out that this includes a lot of files that are not in the repo, including PHP files at the theme root directory. Could someone (@yochannah?) please cross-check these that this looks OK, and not indicative of files that should be under version control but for some reason aren't.

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	.htaccess
	css/style-events.php
	css/style-fellowships.css
	css/style-test.css
	fellowships.php
	header-test.php
	img/1conf2.png
	img/2hackathon.png
	img/BioSmalltalk_Logo.jpg
	img/CGL-Logo.png
	img/GBrowseLogo.png
	img/GSoC-icon-192.png
	img/Pear.png
	img/abstract-animal-aquarium-753266.jpg
	img/animal-biology-blurred-background-1423590.jpg
	img/aquatic-plants-background-beautiful-424763.jpg
	img/bioHaskell.png
	img/bioJS.png
	img/bioRuby.png
	img/biojava.jpg
	img/biology-blur-close-up-760184.jpg
	img/bioperl.jpg
	img/biopython.jpg
	img/biopython.png
	img/biosql.jpg
	img/board-members/Nomi Harris.png
	img/board-members/cjfields.jpg
	img/das.jpg
	img/deadline.png
	img/diversity.png
	img/emboss.jpg
	img/filter.png
	img/googlesummerofcode.png
	img/heart.png
	img/history1.png
	img/history2.png
	img/history3.png
	img/icons/android-chrome-192x192.png
	img/icons/android-chrome-512x512.png
	img/icons/apple-touch-icon.png
	img/icons/email.svg
	img/icons/favicon-16x16.png
	img/icons/favicon-32x32.png
	img/icons/favicon.ico
	img/icons/site.webmanifest
	img/icons8-calendar-100.png
	img/logos/1280px-YouTube_play_buttom_icon_(2013-2017).svg.png
	img/logos/134-1347559_non-copyright-youtube-logo.png
	img/logos/2000px-Google_Plus_logo_2015.svg.png
	img/logos/580b57fcd9996e24bc43c53e.png
	img/logos/FiG5QkCG_400x400.jpg
	img/member1.png
	img/member2.png
	img/member3.png
	img/moby.jpg
	img/obf-logo-1.png
	img/obf-logo-header.png
	img/obf-logo.png
	img/obf_logo_icon-circle-tr.png
	img/opensource.png
	img/public_opinion.png
	img/select-diversity.png
	img/servers_and_stuff.png
	img/social-1_logo-github.svg
	img/social-1_logo-rss.svg
	img/social-1_logo-twitter.svg
	img/travel_fellowship.png
	js/no-logo-fallback.js
	license.txt
	news.php
	readme.html
	style-2.css
	style-single.css
	test.php
	wp-activate.php
	wp-admin/
	wp-blog-header.php
	wp-comments-post.php
	wp-config.php
	wp-content/
	wp-cron.php
	wp-includes/
	wp-links-opml.php
	wp-load.php
	wp-login.php
	wp-mail.php
	wp-settings.php
	wp-signup.php
	wp-trackback.php
	xmlrpc.php

nothing added to commit but untracked files present (use "git add" to track)

The .htaccess is perhaps entirely expected, but that's not necessarily as obvious for all the others.

@peterjc
Copy link
Member Author

peterjc commented May 27, 2019

Mixed case section headers is now working from phone, will check rest later from a computer.

@peterjc
Copy link
Member Author

peterjc commented May 28, 2019

Confirmed, on a big screen I am now seeing the text width limited, more vertical white space on section headers, and mixed case section headers. This git-based approach seems to work.

How often a cron job would be frequent enough? Hourly?

@hlapp
Copy link
Member

hlapp commented May 28, 2019

Are we going to be merging changes several times a day on a frequent basis? I've set it to once nightly right now, and even that seems far more frequent than changes happen on average. It does give the expectation though that changes merged into master should show up in deployment by the following day.

@peterjc
Copy link
Member Author

peterjc commented May 28, 2019

Nightly should be fine for now - in a month or two we can probably drop it down to weekly if the work load needs minimising?

@nlharris
Copy link
Member

Thank you, @hlapp and @peterjc!

@peterjc
Copy link
Member Author

peterjc commented May 29, 2019

@hlapp when you have a chance, could you add a few notes on the deployment setup to this repositories README file? Thanks. Draft:

Deployment

The website is hosted on XXX, which runs WordPress. WordPress is automatically updated by XXX. The configuration folder XXX is under partial git control as a clone of this repository (plus a lot of untracked files). There is a cron job setup to run git pull, and thus update the style files automatically.

As an aside, perhaps we should add some of the untracked files to the .gitignore file? e.g. wp-*.php (WordPress files), img/*.png, img/*.jpg and img/*.svg (which I assume are backed up with the site's text content).

I don't know enough about WordPress to be sure which we ought to include in the version control - possibly some of the *.css files and .htaccess too?

@yochannah
Copy link
Member

picking up an old thread - I have the contents of this repo checked out into the wp-content/themes folder. Is that the folder you printed out above, @hlapp ? I'm running a clone of the site and have no uncommitted files in the wp-content/theme/obf-new directory.

@peterjc - I think we probably shouldn't .gitignore things in the wp-* folders - content is hosted separately (I can't remember where offhand) and we almost certainly will end up with broken themes if we ignore pictures. It hinges a little on what folder Hilmar was git statusing.

@hlapp
Copy link
Member

hlapp commented Nov 26, 2019

The git status command is from the folder wp-content/themes/obf-new, i.e., the root of the cloned repo.

@yochannah if you get a fresh clone of the repo, of course there won't be any uncommitted files in the wp-content/themes/obf-new directory. The reason these are there is because this directory wasn't empty on the server when I overlaid the repo content on top of it. If none of these files are needed, for example because they are all cruft, then we should simply delete them. However, as I said, at least based on the filenames some of these don't obviously look like cruft, which is why I wanted to be careful and not delete anything.

@yochannah
Copy link
Member

In a brand new clone of the theme there shouldn't be any cruft, so I'm a little confused. Is it possible that these are dev files that were deployed manually by Depashree or me on the dev server? In that case, maybe rename the obf-new folder to obf-new-old (hah!) and clone the theme afresh + make sure we have the right theme selected in the UI? I'm pretty sure it's safe to delete those files - I'm running a clean copy - but I'm still slightly nervous anyway 😆

@hlapp
Copy link
Member

hlapp commented Nov 26, 2019

In a brand new clone of the theme there shouldn't be any cruft, so I'm a little confused.

Perhaps I'm not expressing myself well. By "overlay on existing content" I mean I cloned the repo on top of a populated directory that was already there. This means files coming from the repo will add to or replace files that already existed in the directory. However, files that already existed but aren't present in the repo will become "untracked". Is this maybe clearer?

Is it possible that these are dev files that were deployed manually by Depashree or me on the dev server?

I don't think they can come from anywhere else.

In that case, maybe rename the obf-new folder to obf-new-old (hah!) and clone the theme afresh make sure we have the right theme selected in the UI?

Deleting all untracked files should result in the same outcome, so that's why I have been asking, can these all be deleted.

@peterjc
Copy link
Member Author

peterjc commented Nov 26, 2022

I suspect some of the untracked files ought to be checked in, some are in use including these in the footer (cross reference #35):

  • img/social-1_logo-github.svg
  • img/social-1_logo-rss.svg
  • img/social-1_logo-twitter.svg

That brings up a new question - where did these icons come from and are they appropriately licensed for reuse? My guess from a filename search is the same place https://github.com/pixelstorm/social-svg-icons got their copy from (dated later), or https://github.com/GreenPioneer/images (predates our copy). Neither says where they got them from...

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

No branches or pull requests

4 participants