Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HasanAwad authored Feb 17, 2025
1 parent ad1155d commit 9c4a0e2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main # Runs on every push to main

permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16 # Adjust if needed

- name: Install dependencies
run: npm install

- name: Build project
run: CI=false npm run build


- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main # Since you want to serve from main
folder: build # GitHub Pages will serve from this folder

0 comments on commit 9c4a0e2

Please sign in to comment.