VuePress website hosted on GitHub Pages
I started Jekyll project first to host on Github Pages but GitHub released new GitHub Actions integrations on July 27th, 2022 so I moved to VuePress.
You can use GitHub Actions to build any static website and GitHub Pages to host it quick and for free.
GitHub Actions and VuePress documentation is great so I list the sequence of steps briefly.
Static website setup instructions
- Register (sub)domain and set DNS CNAME record to
<your-username>.github.io
- Create VuePress site and make a repository
- Host the repository on GitHub
- Add new workflow at GitHub Actions tab according to VuePress Guide
- If you use sample config and custom domain add
fqdn
parameter in the lastdocs
job step# please check out the docs of the workflow for more details # @see https://github.com/crazy-max/ghaction-github-pages - name: Deploy to GitHub Pages uses: crazy-max/ghaction-github-pages@v2 with: # deploy to gh-pages branch target_branch: gh-pages # deploy the default output dir of VuePress build_dir: docs/.vuepress/dist # domain name to set in CNAME file fqdn: notes.arapov.net
- GitHub action will build and push updated static site to
gh-pages
branch at any commit - Check your repository Settings -> Pages page and select
gh-pages
branch to deploy from
Links
- GitHub Pages Deployment — VuePress manual
- A GitHub Action to deploy to GitHub Pages by CrazyMax
- Quickstart for GitHub Pages — GitHub guide