https://yuheijotaki.github.io/works/ なので、
config/dev.env.js
... module.exports = merge(prodEnv, { NODE_ENV: '"development"', ROOT_BASE: '""' // Vue router を GitHub Pages で動かす用の設定 })
config/prod.env.js
... module.exports = { NODE_ENV: '"production"', ROOT_BASE: '"works/"' // Vue router を GitHub Pages で動かす用の設定 }
src/router/router.js
... export default new Router({ mode: 'history', base: process.env.ROOT_BASE, // Vue router を GitHub Pages で動かす用の設定 routes: [ ...
としてからビルド → デプロイでできました。
ただやっぱり、 https://yuheijotaki.github.io/works/about/ など直接ルート設定したページのリンクを踏むとダメそう。。