Skip to content

Instantly share code, notes, and snippets.

@BrychanOdlum
Created December 5, 2019 17:47
Show Gist options
  • Save BrychanOdlum/63b80de7668348ff293d5b96d21ef65b to your computer and use it in GitHub Desktop.
Save BrychanOdlum/63b80de7668348ff293d5b96d21ef65b to your computer and use it in GitHub Desktop.
Build and deploy React app to Github Pages via Github Actions
name: Deploy
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: yarn
- name: Build project
run: yarn build
- name: (Temporary hack) Add CNAME file
run: echo $GH_CNAME > ./build/CNAME
env:
GH_CNAME: ${{ secrets.GH_CNAME }}
- name: Publish site
uses: maxheld83/[email protected]
env:
GH_PAT: ${{ secrets.GH_PAT }}
BUILD_DIR: ./build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment