# The Problem
Hidden files and directories (e.g. `.well-known`) are unconditionally excluded from the tar archive. There is no way to include them. (#129)
# The Solution
Add an `include-hidden-files` input (default `false`) that skips the `--exclude=.[^/]*` pattern when set to `true`. `.git` and `.github` are always excluded regardless. Test coverage added for the new option.
I think this is the right approach rather than #134. Keep the default behavior safe, and give a sane option to users who know what they're doing. It was safe enough for upload-artifact, it should be safe enough here.
# Context
`actions/upload-artifact` introduced hidden file exclusion and a corresponding `include-hidden-files` option in [v4.4.0](https://github.com/actions/upload-artifact/releases/tag/v4.4.0). This action adopted the same exclusion behavior in its tar step but never added the equivalent option. This PR closes that gap.
The only sane workaround without this option is to drop this action, manually create the tar, and hand it to `upload-artifact` directly. See [expressjs/expressjs.com#2173](https://github.com/expressjs/expressjs.com/pull/2173) for an example.
This workflow file publishes new action releases to the immutable action package of the same name as this repo.
This is part of the Immutable Actions project which is not yet fully released to the public. First party actions like this one are part of our initial testing of this feature.
| `name` | `false` | `github-pages` | Artifact name |
| `path` | `true` | `_site/` | Path of the directory containing the static assets |
| `retention-days` | `false` | `1` | Duration after which artifact will expire in days |
| `include-hidden-files` | `false` | `false` | Include hidden files and directories (those starting with a dot) in the artifact. Excludes `.git` and `.github` regardless. |
| `artifact_id` | The ID of the artifact that was uploaded |
## Artifact validation
While choosing to use this action as part of your approach to deploying to GitHub Pages is technically optional, we highly recommend it since it takes care of producing (mostly) valid artifacts.
However, if you _**do not**_ choose to use this action but still want to deploy to Pages using an Actions workflow, then you must upload an Actions artifact that meets the following criteria:
- Be named `github-pages`
- Be a single [`gzip` archive][gzip] containing a single [`tar` file][tar]
The [`tar` file][tar] must:
- be under 10GB in size
- be under 10GB in size (we recommend under 1 GB!)
- :warning: The GitHub Pages [officially supported maximum size limit is 1GB][pages-usage-limits], so the subsequent deployment of larger tarballs are not guaranteed to succeed — often because they are more prone to exceeding the maximum deployment timeout of 10 minutes.
- ⛔ However, there is also an _unofficial_ absolute maximum size limit of 10GB, which Pages will not even _attempt_ to deploy.
- not contain any symbolic or hard links
- contain only files and directories
# File Permissions
When using this action, ensure that your files have appropriate file permissions.
At a minimum, GitHub Pages expects:
- files to have read permission for the current user and the "Others" user role (e.g. `0744`, `0644`, `0444`)
- directories to have read and execute permissions for the current user and the "Others" user role (e.g. `0755`, `0555`)
Failure to supply adequate permissions will result in a `deployment_perms_error` when attempting to deploy your artifacts to GitHub Pages.
@@ -70,11 +81,11 @@ In order to release a new version of this Action:
2. Publish the draft release from the `main` branch with semantic version as the tag name, _with_ the checkbox to publish to the GitHub Marketplace checked. :ballot_box_with_check:
3. After publishing the release, the [`release` workflow][release] will automatically run to create/update the corresponding the major version tag such as `v0`.
3. After publishing the release, the [`release` workflow][release] will automatically run to create/update the corresponding major version tag such as `v0`.
⚠️ Environment approval is required. Check the [Release workflow run list][release-workflow-runs].
# License
## License
The scripts and documentation in this project are released under the [MIT License](LICENSE).
@@ -86,3 +97,4 @@ The scripts and documentation in this project are released under the [MIT Licens
# Add some symlinks (which we should dereference properly when archiving)
ln -s subdir subdir-link
ln -s hello.txt bonjour.txt
# Create some hidden files
echo'foo' > .hidden
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.