Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Setup Node.js environment
uses: actions/[email protected]
with:
# Set always-auth in npmrc.
always-auth: # optional, default is false
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.
node-version: # optional
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.
node-version-file: # optional
# Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.
architecture: # optional
# Set this option if you want the action to check for the latest available version that satisfies the version spec.
check-latest: # optional
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.
registry-url: # optional
# Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).
scope: # optional
# Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.
cache: # optional
# Set to false to disable automatic caching based on the package manager field in package.json. By default, caching is enabled if the package manager field is present.
package-manager-cache: # optional, default is true
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.
cache-dependency-path: # optional
# Used to specify an alternative mirror to downlooad Node.js binaries from
mirror: # optional
# The token used as Authorization header when fetching from the mirror
mirror-token: # optional
Comment on lines +51 to +80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix YAML syntax before merge.

The Setup Node.js environment block is at the wrong indentation level, so the workflow file no longer parses (mapping values are not allowed in this context). GitHub Actions will ignore the entire workflow until this is fixed. Either remove the stray template block or add it as its own properly indented step, e.g.:

       - name: Deploy to GitHub Pages
         id: deployment
         uses: actions/deploy-pages@v4
-            - name: Setup Node.js environment
-  uses: actions/[email protected]
-  with:
-    always-auth:
-    node-version:
-    node-version-file:
-    architecture:
-    check-latest:
-    registry-url:
-    scope:
-    token:
-    cache:
-    package-manager-cache:
-    cache-dependency-path:
-    mirror:
-    mirror-token:
+      - name: Setup Node.js environment
+        uses: actions/setup-node@v5
+        with:
+          node-version: 20

(Adjust or drop the step as needed.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/deploy-pages@v4
- name: Setup Node.js environment
uses: actions/[email protected]
with:
# Set always-auth in npmrc.
always-auth: # optional, default is false
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.
node-version: # optional
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.
node-version-file: # optional
# Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.
architecture: # optional
# Set this option if you want the action to check for the latest available version that satisfies the version spec.
check-latest: # optional
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.
registry-url: # optional
# Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).
scope: # optional
# Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.
cache: # optional
# Set to false to disable automatic caching based on the package manager field in package.json. By default, caching is enabled if the package manager field is present.
package-manager-cache: # optional, default is true
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.
cache-dependency-path: # optional
# Used to specify an alternative mirror to downlooad Node.js binaries from
mirror: # optional
# The token used as Authorization header when fetching from the mirror
mirror-token: # optional
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Setup Node.js environment
uses: actions/setup-node@v5
with:
node-version: 20
🧰 Tools
🪛 actionlint (1.7.8)

52-52: could not parse as YAML: mapping values are not allowed in this context

(syntax-check)

🪛 YAMLlint (1.37.1)

[error] 52-52: syntax error: mapping values are not allowed here

(syntax)

🤖 Prompt for AI Agents
.github/workflows/jekyll-gh-pages.yml around lines 51-80: the "Setup Node.js
environment" block is incorrectly indented and currently breaks YAML parsing;
either remove this stray template block or move it into the job's steps array
with correct indentation and keys (e.g., as a step under jobs.<job_id>.steps
with a top-level - name: "Setup Node.js environment" and the uses:
actions/[email protected] line aligned under that step), ensure only valid step
keys (name, uses, with) are present, remove the inline commented parameter list
or convert it to proper with: entries if you intend to configure options, and
re-validate the workflow YAML to confirm parsing succeeds before merging.