I have problems with the Deploying of my book on GitHub Pages. Could any of you explain to me step by step how to deploy in the simplest possible hands?
First try Deploying Book to GitHub Pages with travis.yml. I have tried with tokens and travis.yml but something is not working.
- Go to Travis-ci.com and Sign up with GitHub.
- Accept the Authorization of Travis CI. You’ll be redirected to GitHub.
- Click on your profile picture in the top right of your Travis Dashboard, click the green Activate button, and select the repositories you want to use with Travis CI.
- Generate new token
Go to your repository's Travis CI settings page and add an environment variable named GITHUB_TOKEN that is marked secure and not shown in the logs. How?
Create file travis.yml on my local folder or in remote GitHub repo folder?
- After what i have to do?
The code that I put into travis.yml
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: path / to / mybook / book
keep-history: false
on:
branch: master
It's my first time on GitHub and i don't know any commands, I'm learning now.
Second try Deploying to GitHub Pages manually. The first time it worked. But creating a new repository gives me an error regarding the temporary folder (number 7). What is the correct procedure? I list all the steps I took to generate the book
- cloned the repo locally
$ git clone ... repo.git $ mdbook init --theme- I added all the * .md files in the src / folder
- I modify the SUMMARY.md
$ git add -A $ git push```- I create the gh-pages branch
git branch gh-pages $ git worktree add / tmp / book gh-pagesfatal: '/ tmp / book' already existsIf I use another directory, for example,tmp / book2, it goes on correctly for a few steps$ mdbook build$ rm -rf / tmp / book2 / *$ cp -rp book2 / * / tmp / book2 /Another error here!cp: book2/*: No such file or directory. The first time he had given me no mistakes. What am I doing wrong in the linux command?$ cd / tmp / book2$ git add -A$ git commit 'new book message'$ git push origin gh-pages$ cd -