Skip to content

Create jekyll-gh-pages.yml #3

Create jekyll-gh-pages.yml

Create jekyll-gh-pages.yml #3

Workflow file for this run

name: Deploy React App to GitHub Pages
on:
push:
branches: ["main"] # Runs on pushes to the main branch
workflow_dispatch: # Allows manual runs
# Permissions to deploy to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Ensures only one deployment is active at a time
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Specify a version compatible with your project
- name: Install Dependencies
run: npm install --legacy-peer-deps
- name: Build Project
run: npm run build
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run deploy
# Job to deploy the static site to GitHub Pages
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build

Check failure on line 48 in .github/workflows/gh-pages.yml

View workflow run for this annotation

GitHub Actions / Deploy React App to GitHub Pages

Invalid workflow file

The workflow is not valid. .github/workflows/gh-pages.yml (Line: 48, Col: 12): Job 'deploy' depends on unknown job 'build'.
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4