Pages provider not deploying svg files


I have a project that builds an html site (using rust mdBook, plus scripts to generate .svg files) in target/html directory and then uploaded it to gh pages using the pages provider from my .travis.yml

It’s copying the html, js and png files - but it doesn’t seem to be deploying to the gh-pages branch the SVG files in the same folder.

Is there a way to force certain files type to be deployed to the gh-pages branch?

Here is my deploy script:

  provider: pages
  skip-cleanup: true
  github-token: $GITHUB_PAGES_TOKEN
  local-dir: target/html
  keep-history: false
    branch: master

List of files in target folder to be deployed:

ls target/html/samples/prime
DESCRIPTION.html                    generate_composites.toml      manifest.json    
composites.toml                 print_all.toml
context.toml                    remainder_zero.toml                test.arguments
even.toml                       test.err
expected.output                 test.input

Sample GH page:

GH pages branch for that folder: that lacks the svg files listed above, but it does include some other file types like .toml.

Here is the build/deploy run on master that did the gh pages deploy:
It’s not very verbose in the deploy section to help understand what is included and what not.

Any ideas?

I admit that I’m a little confused here.

You are ignoring target directory

so I’d expect that the entirety of target directory would be ignored by the deployment (because it uses git push to accomplish the job, as explained in, but your deployment commit

appears to have a lot of stuff.

1 Like

And it gets updated. I recently updated the docs to refer to the SVG image (was png before) and the pages reflect that - so it’s deploying updates to content to the ghpages branch…

That commit is the “first ghpages” deploy (by Travis I think) to ghpages from master - I haven’t done any manually (that I know of)

The docs are built into the target (like “out” directory examples) folder, and are not source assets, so they should be ignored for normal source control.

My understanding is: The deploy provider takes the code in the local-dir: target/html folder and git push --force pushes it to the root folder (not under target/) on the GH pages branch - as you can see here You can see the index.html file from target/html/index.html is in the root folder.

If I execute this myself by hand

	@git worktree prune
	@rm -rf /tmp/guide
	git worktree add /tmp/guide gh-pages
	rm -rf /tmp/guide/*
	cp -rp target/html/* /tmp/guide/
	cd /tmp/guide && \
		git add -A && \
		git commit -m "deployed on $(shell date) by ${USER}" && \
		git push --force origin gh-pages

then it all works fine. gh-pages branch now contains the SVG files I’d like.