Merge pull request #4 from ashish10677/fix-local-build #18
This file contains hidden or 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: Eleventy Build | |
on: | |
push: | |
branches: | |
- main # Adjust if your default branch is different | |
workflow_dispatch: # Allows manual triggering | |
permissions: | |
id-token: write | |
pages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build site with Eleventy | |
run: npm run deploy-dev # Ensure this script is set up in package.json | |
- name: Upload artifact for deployment | |
id: dep | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: public # Change this if your output folder is different | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: dep | |
uses: actions/deploy-pages@v4 |