Ole
Ole

Reputation: 46890

Publishing built files to gh-pages with Travis CI

For this repository I'm trying to publish the built files using Travis CI.

I'm following these instructions. IIUC setting skip_cleanup to true should make Travis also publish the target folder containing the built resources, however I don't see these resources. Thoughts?

Upvotes: 3

Views: 131

Answers (1)

Ole
Ole

Reputation: 46890

I had to delete the target folder from .gitignore in order to get the travis commit to gh-pages to work. Not ideal because target resources should not be pushed to the master branch. There's a Travis issue tracking it here.

Update

The end game solution ended up being adding this to my travis configuration:

before_deploy:
    - sed -i '/target/d' .gitignore

That will cause Travis to delete the target folder from .gitignore right before attempting the deploy to github pages. This is OK because it's only done on the Travis end, and not in the master branch on the github end. Full sample travis configuration here.

Upvotes: 4

Related Questions