Fixed UI design #36
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 React App to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: | | |
cd react | |
npm install | |
- name: Build the React app | |
run: | | |
cd react | |
npm run build | |
env: | |
CI: false # bypass ESLint | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
path: ./react/build | |
# Deploy job | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |