Created
January 5, 2020 03:16
-
-
Save BrychanOdlum/224acfb1b8a5cf59c9c5dfba2d1bd903 to your computer and use it in GitHub Desktop.
Webpack: Github Actions -> Github Pages
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 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