Today I Learned

Github Pages hosted create-react-app does not render

Used this Github Action to build and deploy react app to Github Pages…

name: CD

on:
  push:
    branches:
    - master

jobs:
  build:
    
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master
    - uses: actions/setup-node@v1
      with:
        node-version: '12.13'
    - run: npm install
    - run: yarn build
    - name: Deploy
      uses: JamesIves/github-pages-deploy-action@releases/v3
      with:
        ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        BASE_BRANCH: master
        BRANCH: build
        FOLDER: build

…but the page rendered was blank. It seemed, that paths to assets were missing one segment, so attempt to load compiled js resulted in 404s.

Solution was to add following line to package.json

"homepage" : "https://github-user-or-org-name-here.github.io/project-name-here",

as project-name-here was the missing segment. Redeploy, and voila!