MCPcopy Index your code
hub / github.com/JamesIves/github-pages-deploy-action

github.com/JamesIves/github-pages-deploy-action @v4.8.0 sqlite

repository ↗ · DeepWiki ↗ · release v4.8.0 ↗
81 symbols 191 edges 34 files 14 documented · 17%
README

GitHub Pages Deploy Action Logo

GitHub Pages Deploy Action :rocket:

Automatically deploy your project to GitHub Pages with GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like, including gh-pages and docs. It can also handle cross repository deployments and works with GitHub Enterprise too.

Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💖

github  annegentle  tonjohn  Zhenglei-BCS    

Chooksta69  MattWillFlood  jonathan-milan-pollock  raoulvdberge  robjtede  hadley  kevinchalet  Yousazoe  planetoftheweb  melton1968  szepeviktor  sckott  provinzkraut  electrovir  Griefed  MontezumaIves  wylie  pylapp  leoxeno      

Getting Started :airplane:

You can include the action in your workflow to trigger on any event that GitHub actions supports. If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the actions/checkout step before this workflow runs in order for the deployment to work. If you intend to make multiple deployments in quick succession you may need to leverage the concurrency parameter in your workflow to prevent overlaps.

You can view an example of this below.

name: Build and Deploy
on: [push]
permissions:
  contents: write
jobs:
  build-and-deploy:
    concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v6

      - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
        run: |
          npm ci
          npm run build

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@v4
        with:
          folder: build # The folder the action should deploy.

[!NOTE] You must configure your repository to deploy from the branch you push to. To do this, go to your repository settings, click on Pages, and choose Deploy from a Branch from the Source dropdown. From there select the branch you supplied to the action. In most cases this will be gh-pages as that's the default.

If you'd like to make it so the workflow only triggers on push events to specific branches then you can modify the on section.

on:
  push:
    branches:
      - main

[!WARNING] If you do not supply the action with an access token or an SSH key, you must access your repositories settings and provide Read and Write Permissions to the provided GITHUB_TOKEN, otherwise you'll potentially run into permission issues. Alternatively you can set the following in your workflow file to grant the action the permissions it needs.

permissions:
  contents: write

Configuration 📁

The with portion of the workflow must be configured before the action will work. You can add these in the with section found in the examples above. Any secrets must be referenced using the bracket syntax and stored in the GitHub repository's Settings/Secrets menu. You can learn more about setting environment variables with GitHub actions here.

Required Setup

The following options must be configured in order to make a deployment.

Key Value Information Type Required
folder The folder in your repository that you want to deploy. If your build script compiles into a directory named build you'd put it here. If you wish to deploy the root directory you can place a . here. You can also utilize absolute file paths by prepending ~ to your folder path. Note that any files/folders matching .gitignore entries will not be deployed. Some tools auto-generate a .gitignore file for build output. with Yes

By default, the action does not need any token configuration and uses the provided repository scoped GitHub token to make the deployment. If you require more customization you can modify the deployment type using the following options.

Key Value Information Type Required
token This option defaults to the repository scoped GitHub Token. However, if you need more permissions for things such as deploying to another repository, you can add a Personal Access Token (PAT) here. This should be stored in the secrets / with menu as a secret. We recommend using a service account with the least permissions necessary and recommend when generating a new PAT that you select the least permission scopes necessary. Learn more about creating and using encrypted secrets here. with No
ssh-key You can configure the action to deploy using SSH by setting this option to a private SSH key stored as a secret. It can also be set to true to use an existing SSH client configuration. For more detailed information on how to add your public/private ssh key pair please refer to the Using a Deploy Key section of this README. with No

Optional Choices

Key Value Information Type Required
branch This is the branch you wish to deploy to, for example, gh-pages or docs. Defaults to gh-pages. with No
git-config-name Allows you to customize the name that is attached to the git config which is used when pushing the deployment commits. If this is not included it will use the name in the GitHub context, followed by the name of the action. with No
git-config-email Allows you to customize the email that is attached to the git config which is used when pushing the deploym

Extension points exported contracts — how you extend this code

ActionInterface (Interface)
(no doc)
lib/constants.d.ts
ActionInterface (Interface)
(no doc)
src/constants.ts
NodeActionInterface (Interface)
(no doc)
lib/constants.d.ts
NodeActionInterface (Interface)
(no doc)
src/constants.ts

Core symbols most depended-on inside this repo

execute
called by 32
src/execute.ts
execute
called by 26
lib/execute.js
deploy
called by 14
lib/git.js
isNullOrUndefined
called by 14
src/util.ts
toString
called by 8
lib/worktree.js
toString
called by 8
src/worktree.ts
generateFolderPath
called by 5
lib/util.js
checkParameters
called by 5
lib/util.js

Shape

Function 59
Enum 8
Class 6
Interface 4
Method 4

Languages

TypeScript100%

Modules by API surface

src/util.ts11 symbols
lib/util.js11 symbols
lib/worktree.js9 symbols
lib/execute.js7 symbols
src/constants.ts6 symbols
lib/git.js6 symbols
lib/constants.d.ts6 symbols
src/worktree.ts5 symbols
lib/ssh.js5 symbols
lib/lib.js5 symbols
src/execute.ts3 symbols
src/git.ts2 symbols

Dependencies from manifests, versioned

@actions/core2.0.2 · 1×
@actions/exec2.0.0 · 1×
@actions/github7.0.0 · 1×
@actions/io2.0.0 · 1×
@eslint/js9.0.0 · 1×
@types/jest29.5.14 · 1×
@types/node22.15.30 · 1×
@typescript-eslint/eslint-plugin8.52.0 · 1×
eslint9.28.0 · 1×
eslint-plugin-jest29.12.1 · 1×

For agents

$ claude mcp add github-pages-deploy-action \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact