Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4c95c0c
Replace --exclude-from with --filter to allow for .gitignore syntax i…
claytoncollie Apr 3, 2024
225bc53
Update README to show that full syntax is supported
claytoncollie Apr 3, 2024
64424d6
Change syntax to dir-merge to see if direcotires are supported in the…
claytoncollie Aug 14, 2024
dd8d664
Wrap command in quotes to pass static analysis
claytoncollie Aug 14, 2024
aaec0a2
add logging to rsync command
claytoncollie Sep 16, 2024
d14eb77
change rsync command
claytoncollie Sep 16, 2024
488a537
dir merge
claytoncollie Sep 16, 2024
7416faa
remove some logging
claytoncollie Sep 16, 2024
d52cd6d
process file
claytoncollie Sep 16, 2024
3509cb4
process file again
claytoncollie Sep 16, 2024
26675c1
merge plus exclusions
claytoncollie Sep 16, 2024
a646a35
merge plus exclusions
claytoncollie Sep 16, 2024
739c062
clean up
claytoncollie Sep 16, 2024
0068ee4
Merge branch 'develop' into fix/distignore
kmgalanakis May 28, 2025
f020988
Alternative approach
kmgalanakis May 28, 2025
fddcb17
Change the rsync arguments
kmgalanakis Jan 16, 2026
0c4d8fb
Remove empty directories when preparing for the deployment
kmgalanakis Jan 16, 2026
c978016
Merge branch 'develop' into fix/distignore
kmgalanakis Jan 16, 2026
d709344
Iterate over the empty folder to delete all of them no matter what de…
kmgalanakis Jan 16, 2026
500a4a6
Increase max_iterations limit for empty directory removal
kmgalanakis Jan 16, 2026
de14c10
Add file listing output for debugging during copy process
kmgalanakis Jan 16, 2026
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ If there are files or directories to be excluded from deployment, such as tests

#### `.distignore`

**Notes:** `.distignore` is for files to be ignored **only**; it does not currently allow negation like `.gitignore`. This comes from its current expected syntax in WP-CLI's [`wp dist-archive` command](https://github.com/wp-cli/dist-archive-command/). It is possible that this Action will allow for includes via something like a `.distinclude` file in the future, or that WP-CLI itself makes a change that this Action will reflect for consistency. It also will need to contain more than `.gitattributes` because that method **also** respects `.gitignore`.
**Notes:** `.distignore` supports the full `.gitignore` syntax which allows negations such as `!important.txt`. This functionality comes from the WP-CLI's [`wp dist-archive` command](https://github.com/wp-cli/dist-archive-command/).

```
/.wordpress-org
Expand Down
3 changes: 2 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ if [[ "$BUILD_DIR" = false ]]; then
if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then
echo "ℹ︎ Using .distignore"
# Copy from current branch to /trunk, excluding dotorg assets
# The --filter flag will allow the full .gitignore syntax to be used in .distignore
# The --delete flag will delete anything in destination that no longer exists in source
rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded
rsync -rc --filter="merge $GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded
else
echo "ℹ︎ Using .gitattributes"

Expand Down