traefik / structor

[Messor Structor 🐜] Manage multiple versions of a Mkdocs documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Final site directory not found

Xumeiquer opened this issue · comments

I am building my docs site with structor and I am getting some errors that I don't know how to solve. The following is the travis output as you will see structor is unable to find the final site folder that needs to be pushed to gh-pages.

Download documentation generator
containous/structor info checking GitHub for tag 'v1.10.0'
containous/structor info found version: 1.10.0 for v1.10.0/linux/amd64
containous/structor info installed /home/travis/gopath/bin/structor
Build documentation
2020/05/16 10:18:46 Run Structor command with config : &{Owner:mole-ids RepositoryName:mole Debug:true DockerfileURL:https://raw.githubusercontent.com/mole-ids/mole/master/docs/docs.Dockerfile DockerfileName:docs.Dockerfile ExperimentalBranchName:master ExcludedBranches:[] DockerImageName:doc-site Menu:0xc000076a80 RequirementsURL: NoCache:false ForceEditionURI:true}
2020/05/16 10:18:46 Temp directory: /tmp/structor022875596
2020/05/16 10:18:46 Latest tag: v0.0.0
2020/05/16 10:18:46 git branch --remotes --list origin\/v*
2020/05/16 10:18:46 Generating doc for version master
2020/05/16 10:18:46 git worktree add /tmp/structor022875596/master origin/master
2020/05/16 10:18:47 Found mkdocs.yml for building documentation in /tmp/structor022875596/master/docs.
2020/05/16 10:18:47 Using docs_dir from manifest: /tmp/structor022875596/master/docs/content
2020/05/16 10:18:47 Found Dockerfile for building documentation in /tmp/structor022875596/master/docs/docs.Dockerfile.
2020/05/16 10:18:47 docker build --no-cache=false -t doc-site:master -f /tmp/structor022875596/master/docs/docs.Dockerfile /tmp/structor022875596/master/docs/
2020/05/16 10:19:23 docker run --rm -v /tmp/structor022875596/master/docs:/mkdocs doc-site:master mkdocs build
2020/05/16 10:19:25 Found mkdocs.yml for building documentation in /tmp/structor022875596/master/docs.
2020/05/16 10:19:25 Generating doc for version v0.0
2020/05/16 10:19:25 git worktree add /tmp/structor022875596/v0.0 origin/v0.0
2020/05/16 10:19:25 Found mkdocs.yml for building documentation in /tmp/structor022875596/v0.0/docs.
2020/05/16 10:19:25 Using docs_dir from manifest: /tmp/structor022875596/v0.0/docs/content
2020/05/16 10:19:25 Found Dockerfile for building documentation in /tmp/structor022875596/v0.0/docs/docs.Dockerfile.
2020/05/16 10:19:25 docker build --no-cache=false -t doc-site:v0.0 -f /tmp/structor022875596/v0.0/docs/docs.Dockerfile /tmp/structor022875596/v0.0/docs/
2020/05/16 10:19:25 docker run --rm -v /tmp/structor022875596/v0.0/docs:/mkdocs doc-site:v0.0 mkdocs build
2020/05/16 10:19:26 Found mkdocs.yml for building documentation in /tmp/structor022875596/v0.0/docs.
2020/05/16 10:19:27 git worktree prune
2020/05/16 10:19:27 [WARN] error during cleaning:  unlinkat /tmp/structor022875596/v0.0/docs/site/sitemap.xml: permission denied
dpl_0
1.34s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Successfully installed dpl-1.10.15
1 gem installed
dpl.1
Installing deploy dependencies
Successfully installed multipart-post-2.1.1
Successfully installed faraday-0.15.4
Successfully installed public_suffix-3.0.3
Successfully installed addressable-2.7.0
Successfully installed sawyer-0.8.2
Successfully installed octokit-4.6.2
Successfully installed dpl-pages-1.10.15
7 gems installed
Logged in as @Xumeiquer (Jaume Martin)
dpl.2
Preparing deploy
Cleaning up git repository with `git stash --all`. If you need build artifacts for deployment, set `deploy.skip_cleanup: true`. See https://docs.travis-ci.com/user/deployment#Uploading-Files-and-skip_cleanup.
Saved working directory and index state WIP on (no branch): 288c8eb Update travis.yml
cd /tmp/d20200516-31989-a5py8t/work
dpl.3
Deploying application
Initialized empty Git repository in /tmp/d20200516-31989-a5py8t/work/.git/
Switched to a new branch 'gh-pages'
cd -
cd /tmp/d20200516-31989-a5py8t/work
rsync: change_dir "/home/travis/gopath/src/github.com/mole-ids/mole/site" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
Already up to date!
HEAD detached at 288c8eb
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	site/
nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/stash@{0} (58ef47d1cccdec10f4121336d29525c42b3347fd)
Could not copy /home/travis/gopath/src/github.com/mole-ids/mole/site.
failed to deploy

Hello,

you have to set skip_cleanup: true or cleanup: false.

Also you have to limit the before_deploy to one execution:
https://github.com/containous/traefik/blob/5f0b6fde928240a1fd1f1267859cde9422919b1b/.travis.yml#L23-L24

Note that before_deploy and after_deploy are run before and after every deploy provider, so they will run multiple times, if there are multiple providers.

https://docs.travis-ci.com/user/job-lifecycle/#deploying-your-code

Hi,

The cleanup is setup as you can see here

On the other hand, I also limit the before_deploy as you mention in this line which actually executes the following script.

The weird thing is that I could deploy once but never again. I also removed the gh-pages just in case with no luck.

https://travis-ci.org/github/mole-ids/mole/jobs/687749713#L1450

cleanup is a dpl v2 option, and you are using dpl v1 so you have to use skip_cleanup: true instead.

That works! Thank you.