.github/workflows/main.yml
Edit homepage in package json and also add hashrouter with react router dom
name: Build and Deploy | |
on: [push] | |
env: | |
REACT_APP_API_URL: ${{secrets.REACT_APP_API_URL}} | |
jobs: | |
build-and-deploy: | |
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | |
runs-on: ubuntu-latest | |
environment: github-pages | |
steps: | |
- name: Checkout ๐๏ธ | |
uses: actions/checkout@v2 | |
- name: Install and Build ๐ง # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. | |
run: | | |
yarn install --frozen-lockfile | |
yarn build | |
- name: Deploy ๐ | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build # The folder the action should deploy. |