Rename Mohammad3.JPEG to crown-prince-london.jpeg #141
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: [main] # Trigger on pushes to `main` | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest # Use Ubuntu (faster/more reliable than macOS) | |
steps: | |
# 1. Checkout code | |
- uses: actions/checkout@v4 | |
# 2. Set up Node.js | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x # Next.js requires Node.js 16+ | |
cache: 'npm' | |
# 3. Install dependencies, build, and export | |
- run: npx browserslist@latest --update-db # Fix browserslist warning | |
- run: npm ci | |
- run: npm run build | |
- run: npm run export | |
- run: touch ./out/.nojekyll # Disable Jekyll processing | |
# 4. Deploy to GitHub Pages | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: master # GitHub Pages branch | |
folder: out # Deploy the `out/` folder | |
clean: true # Delete old files | |
token: ${{ secrets.DEPLOY_TOKEN }} # Critical for permissions! |