cmneal26 / Tech-Writing-Project

Class repository
2 stars 1 forks source link

Add workflow to generate docs folder in GitHub workflow #24

Closed twalker closed 2 years ago

twalker commented 2 years ago

Summary

I'd intended for the site to automatically be built and deployed when the starter project was added in #15

Currently, the site automatically deploys, but is not automatically built--we have to build the site locally to the /docs folder and include the built files in our PR.

This adds a GitHub workflow to build the site automatically. We don't have to build the /docs folder manually. The /docs folder will still exist locally, but will not be included in the repository. It'll be much clearer to everyone, including me, which files need to be edited, and which ones are generated/build.

What kind of change does this PR introduce?

Related issue: closes #23

Changes to GitHub settings

The Github "Pages" settings need to be updated in order for the site to be served from the correct location. @cmneal26 , please update the GitHub Pages settings to use the gh-pages branch, and the /(root) directory: Screen Shot 2022-06-25 at 9 08 40 PM

Before

docs folder was generated locally and included in the git repository.

After

docs folder is generated in a GitHub workflow, and not included in the git repository.

cmneal26 commented 2 years ago

@twalker I was able to change to the root directory, but gh-pages wasn't listed as a branch option.

twalker commented 2 years ago

@cmneal26 , Sorry about that, I didn't realize the branch needed to exist for it to show up in the dropdown. I added a gh-pages branch and it should be available now. Do you mind trying again?

cmneal26 commented 2 years ago

No problem! I got it set up.

twalker commented 2 years ago

@cmneal26 ,

It worked!

Screen Shot 2022-06-26 at 1 03 24 PM

I can see the small update I made to the about page. https://cmneal26.github.io/Tech-Writing-Project/about/