Ignore files when deploying from wercker
wercker doesn’t currently have provide a feature to ignore files when deploying.
As I deploy to Heroku using a
git push I can use a
.gitignore file to ignore files when deploying from wercker.
I have two ignore files,
.gitignore is for my app repository, and
.deploy.gitignore is for ignoring files during the deploy stage.
As part of my build I overwrite
.deploy.gitignore. When wercker creates the deploy repository it ignores any files that match the rules in the ignore file.
I use the following step in my
- script: name: "app init" code: |- cd /pipeline/build cp operations/.deploy.gitignore .gitignore
/pipeline/build is where wercker puts your code so we have to
cd there as the default working directory is
And that’s it. Don’t want any
.pyc files being pushed to your deployment platform, add
*.pyc to your
.deploy.gitignore. Add as many rules as you see fit.