Comments (3)
The --exclude thing is probably a bug.
--transfer as you describe it is already what the deploy directory is. I think we just need to add support for multiple deploy directories/files, and fix --exclude so that it works (and also document this whole thing in the recipes docs).
from doctr.
Do you mean multiple --built-docs
(#221)? So if I had the documentation in docs/build/html
and my post-processing scripts in .travis
, I'd invoke doctr deploy
as something like
doctr deploy --built-docs docs/build/html --built-docs .travis --exclude .travis $DEPLOY_DIR
Actually, that seems weird, since currently (if I undestand correctly) --built-docs
and $DEPLOY_DIR
form a pair, in that the folder specified by --build-docs
will be copied to the $DEPLOY_DIR
on the gh-pages
branch. You'd need multiple pairings. It also wasn't quite clear to me from the documentation of --exclude
whether currently its argument is relative to $DEPLOY_DIR
or to the root of the gh-pages
. It would seem that if there are multiple --built-docs
/$DEPLOY_DIR
, the --exclude
would have to be relative to the root.
To be honest, I don't have a clear mental picture of how doctr deploy
operates. It seems like something along the lines of
- create an empty temporary directory (let's call it
root
) and initialize it as a new temporary branch - copy the
--build-docs
directory toroot/$DEPLOY_DIR
andgit add
it - run
--command
withroot
as the current-working-directly, which can make changes withinroot
andgit add
them - create a commit on the temporary branch
- cherry-pick that commit onto the
gh-pages
branch and push
That wouldn't delete files that are missing in the --build-docs
directory from gh-pages
, though (which I think doctr
does, so the above model likely isn't accurate).
Here's the simpler model that I initially thought was what doctr
was doing (but definitely not what's happening):
- check out
gh-pages
to a temporary folder git rm -rf $DEPLOY_DIR
in thegh-pages
checkout if it exists- copy the
--built-docs
directory to the$DEPLOY_DIR
ingh-pages
- run the
--command
, which can modify any files (it wouldn't have togit add
them if this model was correct) - Commit on
gh-pages
(withgit commit -a
) and push
I have no idea what the --no-sync
and --no-temp-dir
options do. Anyway, sorry for ranting, and if I'm a bit thick on what you're proposing. It might be a good idea to give an overview of the correct mental model in the documentation, though.
For now, I've managed to get by post-processing to work by using
--command="git show $TRAVIS_COMMIT:.travis/docs_post_process.py > post_process.py && git show $TRAVIS_COMMIT:.travis/versions.py > versions.py && python post_process.py"
from doctr.
Reading the source code was illuminating regarding the deployment procedure. The missing piece was the .doctr-files
log using during synchronization, and the fact that the --command
runs after synchronization, but before git add
/git rm
. I created PR #356 to make this part of the documentation
from doctr.
Related Issues (20)
- Azure pipelines to deploy docs HOT 3
- Storing deployment key as secret environment variable? HOT 3
- GitHub Actions HOT 24
- Detect when the current directory doesn't exist HOT 1
- Allow for multiple --command flags HOT 1
- API error when you have push access but not access to upload keys
- Odd behavior mixing --branch-whitelist and --no-require-master
- deploy can fail with SSH fingerprint confirmation
- Consider always adding .nojekyll HOT 4
- fetch command is failing with denied publickey HOT 4
- Password access to the Github API deprecated HOT 3
- Travis showing DOCTR secure keys in the matrix list HOT 2
- --command not working with spaces HOT 7
- --command returncode ignored
- Support any gh-pages branch HOT 3
- Support new authentication for GitHub HOT 3
- Travis is sunsetting .org HOT 4
- git checkout master failed HOT 6
- 403 - Resource not accessible by integration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctr.