# Vuepress and GitHub Pages

First change the config.js file to add base: '/ProgrammingOracle/',, ProgrammingOracle being substituted by the name of the repository of course.

Then Create the repository on GitHub to receive the folder

Then git init

Then git add .

git commit -m "First commit"

to add the remote with git remote add origin git@github.com:ThiagoSoutoGit/ProgrammingOracle.git

git push -u origin master

Then creat the gh-pages branch with git checkout -b gh-pages

Then push the branch to GitHub with git push -u origin gh-pages

Then checkout to master with git checkout master

Create a deploy.sh file like this:

#!/usr/bin/bash

# abort on errors
set -e

git add .
git commit 
git push

# build
yarn docs:build

# navigate into the build output directory
cd docs/.vuepress/dist

# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME

git init
git add .
git commit -m 'New deployment'

git remote add origin git@github.com:ThiagoSoutoGit/ProgrammingOracle.git

# if you are deploying to https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master

# if you are deploying to https://<USERNAME>.github.io/<REPO>
# git push -f origin master:gh-pages
git push -f origin master:gh-pages

cd -

yarn docs:devo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

execute ./deploy.sh