Update Git user name for GitHub Pages deployment #3
This file contains 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 | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
# Install dependencies | |
- name: Install dependencies | |
run: npm install | |
# Build the project | |
- name: Build project | |
run: npm run build | |
# Set up Git user | |
- name: Set up Git user | |
run: | | |
git config --global user.name "Precious-Macaulay" | |
git config --global user.email "preciousmacaulay001@gmail.com" | |
# Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
run: npm run deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |