jspm/jspm.org

Initial deployment refactor [gh action/webhook, git orphan branch]

Closed this issue · 0 comments

Description

Currently when doing local development, after any changes are made, or even after running chomp build, dozens of files will be updated in git. This makes for awkward code review, updates, and onboarding for new engineers.

Solution

  1. Using a git orphan branch, like Github's standard gh-pages, we can use a GitHub action, or other webhooks to update items in public_html after merging to our main branch.
  2. In our main branch, and feature branches, we will ignore public_html and git submodules. This will allow engineers to clone GitHub build public_html for local development but only submit diffs related to html, css, or new docs.

Diagram

sequenceDiagram
    actor eng
    participant main
    participant webhook
    participant gh-pages

    main->>eng: git checkout -b feature-branch

    eng->>eng: make changes
    eng->>eng: submodules are cloned but gitignored
    eng->>eng: public_html is served for development but gitignored
    eng->>main: git push feature-branch

    main->>main: code review
    main->>main: merge

    main->>webhook: kick off jobs

    Note over main,webhook: a webhook could be a webhook, gh action, ci, etc
    webhook->>webhook: get repo submobules
    webhook->>webhook: build updates with submodules to public_html

    webhook->>gh-pages: push updates with public_html
    
    gh-pages->>gh-pages: host new deployed updates public_html
Loading

References