TransitionbyDesign / homemaker

GNU Affero General Public License v3.0
0 stars 1 forks source link

Ensure forestry.io changes get automatically rebuilt and redeployed, becoming visible on the website. #62

Open wu-lee opened 4 years ago

wu-lee commented 4 years ago

Check configs and branches, merging the forestry-starter branch into master

wu-lee commented 3 years ago

I've now configured forestry.io to commit content changes to the master branch of this repository.

I've also set up a Github "action" to rebuild and deploy the website to github pages when anything new is committed to master. As described here:

https://medium.com/better-programming/deploy-your-gatsby-site-with-github-actions-e761ea93813f

TL;DR There's a "personal access token" stored in a Github secret, which the action script uses to get access to the repository to push changes to the gh-pages branch (via npm run deploy executed in a check-out of this repository) Github pages is configured to deploy that branch to the website visible at https://homemakeroxford.org.

Between them, this means when content changes are made via forestry.io, the website site gets updated. To test this I added the DIY house article. (Although the location in the article seems to be outside the Oxford locality, so I've replaced it with the coordinates for Wickes, this will need to be corrected.) It seems to work.

I've added a "badge" in the README.md document, which shows whether the last changes were published successfully. You can also check the status in the Actions tab, see:

https://github.com/TransitionbyDesign/homemaker/actions

As an aside: I've also added a second forestry.io site to post changes to the dev branch, which may be useful for experiments, however it isn't currently configured to publish a website anywhere, which means you can only see the result using the forestry.io preview function.

Note, don't confuse these two forestry.io sites, only one has any effect on the website. Possibly the dev site should be removed if it isn't useful.