Skip to content

added deploy workflow #2

added deploy workflow

added deploy workflow #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # Change if using another branch
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # Allows pushing to `gh-pages`
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false # Ensures manual authentication works
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18' # Use a stable Node.js version
- name: Install dependencies
run: npm install
- name: Build the app
run: npm run build
- name: Deploy to GitHub Pages
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Nkwenti-Severian-Ndongtsop/wishes_page.git
npx gh-pages -d dist --branch gh-pages --message "Deploy 🚀"