Closed mithi closed 4 years ago
I found out about this:
GitHub has this feature called GitHub Pages that converts a GitHub repository into a living, breathing website with a click of the button… as long as this repo is a) written in Frontend code only(Javascript, CSS and HTML) and apparently b) not written in React. If you’ve recently finished a React single page application like me that employs a heavy use of React’s Router Dom library to render certain components when users navigate to certain URLs then this guide is for you.
https://medium.com/@Dragonza/react-router-problem-with-gh-pages-c93a5e243819
gh-pages does not natively support front-end routing. However I still am first being directed to my Page404 upon visiting the website.
GitHub Pages doesn't natively support single page apps. When there is a fresh page load for a url like example.tld/foo, where /foo is a frontend route, the GitHub Pages server returns 404 because it knows nothing of /foo. https://github.com/rafrex/spa-github-pages
Options on where to deploy
Install node dependencies
Prettier
name: Format (prettier)
on:
pull_request:
paths:
- '**.css'
- '**.js'
- '**.vue'
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install
run: yarn install
env:
CI: true
- name: Run prettier
run: yarn run prettier --write 'src/**/*.{css,js,vue}'
- uses: stefanzweifel/git-auto-commit-action@v2.1.0
with:
commit_message: Apply prettier changes
branch: ${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
https://stefanzweifel.io/posts/run-prettier-or-php-cs-fixer-with-github-actions/
Deploy and setup continuous integration