Skip to content

Instantly share code, notes, and snippets.

@BrychanOdlum
Created January 5, 2020 03:16
Show Gist options
  • Save BrychanOdlum/224acfb1b8a5cf59c9c5dfba2d1bd903 to your computer and use it in GitHub Desktop.
Save BrychanOdlum/224acfb1b8a5cf59c9c5dfba2d1bd903 to your computer and use it in GitHub Desktop.
Webpack: Github Actions -> Github Pages
name: Deploy
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install depenqdencies
run: yarn
- name: Build project
run: yarn build
- name: (GH Pages) Route 404s, fixes Router
run: ln -s ./index.html ./build/404.html
- name: (GH Pages) 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