This file contains 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 to GitHub Pages | |
on: | |
push: | |
paths: | |
- 'front-end/**' # Trigger only when changes occur in the ./front-end folder | |
- '.github/workflows/**' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
REACT_APP_API_URL: ${{ secrets.MY_HEROKU_API }} | |
REACT_APP_API_WORKS: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14.0' | |
- name: Install and Build 馃敡 | |
run: | | |
npm install | |
npm run build | |
working-directory: ./front-end | |
- name: Deploy 馃殌 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: ./front-end/build |