Skip to content

Commit

Permalink
ci(deployment): fix GitHub Pages workflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreyeesh committed Dec 30, 2024
1 parent d4fa722 commit d624127
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
branches:
- main # Trigger workflow on push to main branch
- main # Trigger workflow on push to the main branch

permissions:
contents: write
Expand All @@ -18,14 +18,23 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup GitHub Pages
uses: actions/configure-pages@v3
- name: Setup Node.js Environment (if applicable)
uses: actions/setup-node@v3
with:
node-version: '16' # Use a stable Node.js version if required by your project

- name: Install Dependencies (if applicable)
run: |
if [ -f package.json ]; then
npm install
fi
- name: Build Static Site
run: |
mkdir -p build
cp -R * build/ # Copy all project files to the build directory
rm -rf build/.git # Exclude the Git directory to avoid conflicts
rm -rf build/.git # Exclude the .git directory to avoid conflicts
echo "Build directory created."
- name: Upload Files for Deployment
uses: actions/upload-pages-artifact@v2
Expand Down

0 comments on commit d624127

Please sign in to comment.