Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation - Github Deployment precision #2372

Open
trolologuy opened this issue May 5, 2020 · 1 comment
Open

Documentation - Github Deployment precision #2372

trolologuy opened this issue May 5, 2020 · 1 comment
Labels
contribution welcome Contributions welcome documentation Any issues related to documentation

Comments

@trolologuy
Copy link

trolologuy commented May 5, 2020

  • [ x] I confirm that this is an issue rather than a question.

Bug report

Steps to reproduce

If you follow the steps described on the deployment of vuepress github pages the deployment fails due to some missing details (configuration of .travis.yml file + branching) in the documentation.

What is expected?

The deployment to the github page to be working.

What is actually happening?

There is missing information for the case when you are deploying to your "personal space" (I don't know the proper name of it), for example mine is https://trolologuy.github.io/.

If you are deploying to https://.github.io/, you can omit base as it defaults to "/".

As stated on github in the pages setting page (screenshot below),

'User pages must be built from the master branch.'
That means that the generated static files from docs/.vuepress/dist should be pushed into master.

github-pages-settings

That also means that the target_branch option is missing in the .travis.ymlfile.
I added it below commented out:

language: node_js
node_js:
  - lts/*
install:
  - yarn install # npm ci
script:
  - yarn docs:build # npm run docs:build
deploy:
  provider: pages
  target_branch: master
  skip_cleanup: true
  local_dir: docs/.vuepress/dist
  github_token: $GITHUB_TOKEN # A token generated on GitHub allowing Travis to push code on you repository. Set in the Travis settings page of your repository, as a secure variable
  keep_history: true
  on:
    branch: sources

The explanation that could be added on the documentation could be:

If you are deploying to https://.github.io/, you can omit base as it defaults to "/".
Be aware that your generated static files have to be present on the master branch of your repository (github pages technical limitation).
This could be solved for example by creating a sources branch where you would put the source code of your project. This can be achieved with

git checkout -b sources
git push origin sources

To enable travis to push to the master branch, please uncomment the line # target_branch: master by removing the #.
Final step would be to add the files to your branch (for e.g with git add *) and push your files to the remote branch (git push origin sources).

Other relevant information

  • Output of npx vuepress info in my VuePress project:
@CodesOfRa CodesOfRa added contribution welcome Contributions welcome documentation Any issues related to documentation labels Jul 9, 2020
@Patil2099
Copy link

If this is still open I would to work on this. Can you guide me on where I have to change the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contributions welcome documentation Any issues related to documentation
Projects
None yet
Development

No branches or pull requests

3 participants