ucsb-cs156-s21 / proj-ucsb-cs-las

https://proj-ucsb-cs-las.herokuapp.com/
MIT License
2 stars 3 forks source link

Staff s21 publish docs #171

Closed pconrad closed 3 years ago

pconrad commented 3 years ago

In this PR, we set up a GitHub workflow to publish the storybook for the repo.

The storybook is published on GitHub pages in two separate repos:

One of the workflows is set up to publish to the production site, i.e. https://ucsb-cs156-s21.github.io/proj-ucsb-cs-las-docs, only on a push to the main branch (i.e. when a PR is merged.)

The other workflow is set up to publish to the QA branch any time there is a PR. Note the implications: if there are multiple PRs outstanding, the contents of the qa GitHub pages site will always reflect the most recent PR that was made. Teams will have to coordinate in order to review changes to the Storybook, so this is not a perfect solution. But it at least guarantees that if there are any problems with the publishing, those will get flagged as CI/CD errors, and it encourages teams to review the storybook before merging a PR.

The other sites need to be set up as follows:

First, add a file under docs/index.md that looks like this for the production docs site:

---
---

Documentation for <https://github.com/ucsb-cs156-s21/proj-ucsb-cs-las>

[Storybook](storybook)

And like this for the qa docs site:

---
---

Documentation QA site for <https://github.com/ucsb-cs156-s21/proj-ucsb-cs-las>

* Documentation on this site is for work in progress.
* The production version of the documentation is here: <ucsb-cs156-s21.github.io/proj-ucsb-cs-las-docs>

[Storybook](storybook)

Then, you can go to Settings for each of these repos, then Pages (near bottom of left nav) to enable GitHub Pages on the main branch and the /docs subdirectory.

It is also necessary to set up a Personal Access Token called TOKEN with scope repo and add it to the repository secrets.

codecov[bot] commented 3 years ago

Codecov Report

Merging #171 (4db1968) into main (3e33145) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #171   +/-   ##
=========================================
  Coverage     99.82%   99.82%           
  Complexity      342      342           
=========================================
  Files            83       83           
  Lines          1669     1669           
  Branches         77       77           
=========================================
  Hits           1666     1666           
  Misses            3        3           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3e33145...4db1968. Read the comment docs.