Развертывание VuePress на страницах GitHub - PullRequest
0 голосов
/ 27 апреля 2020

Попытка развернуть эту документацию:

https://github.com/aitormendez/democracia/tree/master/docs

на странице GitHub: https://aitormendez.github.io/democracia/

I получите что-то другое в локальном dev и Github.

Это выглядит в локальном dev:

This is the look in local dev

И это выглядит на GithHub:

this is the look at GithHub

Также .vuepress/dist/index.html выглядит так:

enter image description here

это конфигурация. js:

https://github.com/aitormendez/democracia/blob/master/docs/.vuepress/config.js

module.exports = {
    home: true,
    title: 'Democracia. Manual de uso web',
    base: '/democracia/',
    themeConfig: {
        nav: [
            {text: 'Democracia', link: 'https://democracia.com.es'}
        ],
        sidebar: [
            {
                title: 'Contenido',
                collapsable: false,
                children: [
                '/',
                'front-page',
                ]
            },
        ]
    }
}

пакет. json:

https://github.com/aitormendez/democracia/blob/master/package.json

{
  "devDependencies": {
    "vuepress": "^1.4.1"
  },
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
  }
}

И развертывание. sh

#!/usr/bin/env sh
set -e
npm run docs:build
cd docs/.vuepress/dist
git init
git add -A
git commit -m 'deploy'
git push -f git@github.com:aitormendez/democracia.git master:gh-pages
cd -

AFAIK, я выполнил шаги по развертыванию на Github: https://vuepress.vuejs.org/guide/deploy.html#github -страницы

Что я делаю не так?

1 Ответ

0 голосов
/ 27 апреля 2020

Параметры github были неверны. В качестве источника необходимо было указать ветку gh-pages.

enter image description here

...