Skip to content

Update description

Update description #14

Workflow file for this run

# Workflow for deploying a React Vite app to GitHub Pages
name: Deploy React Vite App to Pages
on:
# Runs on pushes targeting the default branch (e.g., master or main)
push:
branches: ["master"] # Update this if your default branch is "master"
# Allows manual triggering of the workflow from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
# Step 1: Checkout repository content
- name: Checkout repository content
uses: actions/checkout@v4
# Step 2: Set up Node.js environment
- name: Set up Node.js environment
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
# Step 3: Install dependencies and build the project
- name: Install dependencies and build project
run: |
npm ci
npm run build
# Step 4: Upload artifact (compiled files in `dist` folder)
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'dist' # Path to the folder containing compiled files
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4