Skip to content

Instantly share code, notes, and snippets.

@nautilytics
Created September 16, 2020 20:34
Show Gist options
  • Save nautilytics/c8cc6ea1c68d03fc54f88998acb9e16d to your computer and use it in GitHub Desktop.
Save nautilytics/c8cc6ea1c68d03fc54f88998acb9e16d to your computer and use it in GitHub Desktop.
Deploy a React application to Github Pages
name: Build and Deploy a React application to GitHub-Pages
on:
push:
branches:
- master
jobs:
build-and-deploy-to-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install and Build 🔧
run: |
yarn
yarn run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment