Skip to content

Add configurable deployment exclude list to allow deploying .github content#1979

Draft
Copilot wants to merge 3 commits intodevfrom
copilot/add-optional-exclude-for-github-folder
Draft

Add configurable deployment exclude list to allow deploying .github content#1979
Copilot wants to merge 3 commits intodevfrom
copilot/add-optional-exclude-for-github-folder

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

The action currently hardcodes deployment excludes, which prevents deploying .github from build output. This change makes deployment excludes configurable while preserving current safety defaults when no override is provided.

  • New input: configurable deploy excludes

    • Added a new optional exclude input (multiline) in action.yml.
    • Parsed into ActionInterface.exclude in src/constants.ts.
  • Deploy behavior update

    • Reworked rsync exclude construction in src/git.ts:
      • If exclude is provided, use that list.
      • If not provided, keep existing defaults (.ssh, .git, .github).
      • Continue excluding the temporary deployment directory when deploying from workspace root.
  • Documentation updates

    • Added exclude to the README configuration table.
    • Added an explicit warning that providing exclude replaces default excludes.
  • Targeted test coverage

    • Added tests in __tests__/git.test.ts for:
      • default exclude fallback behavior
      • custom exclude override behavior

Example workflow usage:

- name: Deploy 🚀
  uses: JamesIves/github-pages-deploy-action@v4
  with:
    folder: dist
    exclude: |
      .github
      file.xml

Copilot AI changed the title [WIP] Add option to exclude .github folder from deployment Add configurable deployment exclude list to allow deploying .github content Apr 17, 2026
Copilot AI requested a review from JamesIves April 17, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy with .github folder is not possible

2 participants