Skip to content

Merge pull request #45 from SamiJohannes/update-workflow-deploy #4

Merge pull request #45 from SamiJohannes/update-workflow-deploy

Merge pull request #45 from SamiJohannes/update-workflow-deploy #4

Workflow file for this run

name: Deploy React App to GitHub Pages
on:
push:
branches:
- workflow-deploy # Deploy only when pushing to the workflow-deploy branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Step 2: Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22' # Specify the Node.js version
# Step 3: Install dependencies
- name: Install Dependencies
run: npm install
# Step 4: Build the React app
- name: Build React App
run: npm run build
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
run: npm run deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}