pyladies / chapter-websites

Repo of all the PyLadies chapter websites submodules
MIT License
8 stars 14 forks source link

PyLadies Chapter Websites

Request a PyLadies chapter repository

To start you'll need to open an issue in this repository providing:

You'll be provided a PyLadies organization repository (e.g. PyLadies Chicago) and be setup in a PyLadies team with proper publishing permissions.

What to include in your PyLadies page

Some ideas of content to include on your page:

Bootstrap with PyLadies templates

We've started adding templates into the pyladies organization you can use by clicking the Use this template button. Existing templates include:

If you have a template you'd like to create here's how.

Adding your website to a submodule

If your website code lives in the main Pyladies repo, you'll want to copy your contents into the new repository that the PyLadies Tech Infra team will create for you. Then in the main Pyladies repo you will need to open a pull request to remove your website. Follow these instructions to remove the website.

The workflow for adding your website as a submodule is as follows:

$ cd chapter-websites  # PyLadies repo root
$ git submodule add -b <YOUR_CHAPTER_WEBSITE_REPO_PROD_BRANCH> https://github.com/<YOUR_GITHUB_USER_NAME>/<YOUR_PYLADIES_WEBSITE_REPO>.git chapter_websites/<YOUR_CHAPTER_NAME> # e.g. git submodule add -b gh-pages https://github.com/pyladies/pyladies-chicago-website chicago
$ git submodule init # Adds to .gitmodules 

Here is an example pull request adding Chicago to the repository.

If you ever want the PyLadies repo to be fixed at the most recent commit of your website you'll need to:

$ cd chapter-websites/<YOUR_CHAPTER_NAME>  # Your PyLadies website submodule directory
$ git checkout <YOUR_CHAPTER_WEBSITE_REPO_PROD_BRANCH> # Update to whichever branch you use to host your production code on e.g. gh-pages if hosting on GitHub pages
$ git pull 
$ cd ../
$ git add <YOUR_CHAPTER_NAME> # Your PyLadies website submodule directory
$ git commit -m "Update submodule for chapter <YOUR_CHAPTER_NAME> to latest commit on main"
$ git push <YOUR_CHAPTER_WEBSITE_REPO_PROD_BRANCH>

Updating your website submodule

The repository is setup to use a GitHub action to checkout submodules defined in the repo any time a push to main happens. The setup is specified under .github/workflows/build.yml. Or you can see more info under the repo actions tab.

Or you can do this manually via git submodule update --recursive --remote from the project root locally.

Questions?

Reach out to #project-tech-infra on the PyLadies Slack!