Created
December 5, 2019 17:47
-
-
Save BrychanOdlum/63b80de7668348ff293d5b96d21ef65b to your computer and use it in GitHub Desktop.
Build and deploy React app to Github Pages via Github Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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