s0 / git-publish-subdir-action

GitHub Action to push a subdirectory as a branch to any git repo (e.g. for GitHub Pages)
https://github.com/marketplace/actions/push-git-subdirectory-as-branch
MIT License
208 stars 36 forks source link

Prevent action from overwriting certain files #55

Closed loicnestler closed 2 years ago

loicnestler commented 2 years ago

Hey there!

I'm using this action to develop a Shopify theme for a client of mine. My set-up is the following: Branch dev contains 2 directories: src and theme. My action builds JS / CSS from src into theme/assets and pushes the theme dir into branch main. The main branch is linked-up into their Shopify store, so whenever I push some changes, it gets (nearly) instantly reflected in their web shop.

However, whenever they customize the theme using Shopify's theme editor, Shopify stores the set settings into main: /config/settings_data.json. Can I somehow exclude this file from getting overwritten by my workflows, so that I don't reset all settings on every push of mine?

I already tried adding an .autopublish.ignore file in the root of my dev branch (and obv added CLEAR_GLOBS_FILE: ".autopublish-ignore" into my workflow.yml) containing the following 2 lines:

!theme/config/settings_data.json
!config/settings_data.json

but it somehow doesn't seem to do anything.

Thanks in regards!