Deploy a VuePress site
Set up a new project
Scaffold a VuePress site using the
create-vuepress-site tool to set up a new project, you can use
yarn by passing in
create-vuepress-site and the name of the directory where you want the project to live:
$ npx create-vuepress-site [optionalDirectoryName]
The command will interactively prompt for details to configure your VuePress site’s metadata such the project name, description, maintainer’s email and repository URL.
Once this is done, a scaffolded documentation site will be created in the
docs directory and ready for you to customize or deploy.
Before you continue
Create a GitHub repository
$ git init$ git remote add origin https://github.com/<your-gh-username>/<repository-name>$ git add .$ git commit -m "Initial commit"$ git branch -M main$ git push -u origin main
Deploy with Cloudflare Pages
To deploy your site to Pages:
- Log in to the and select your account.
- In Account Home, select Workers & Pages > Create application > Pages > Connect to Git.
- Select the new GitHub repository that you created and, in the Set up builds and deployments section, the following information will be provided:
After configuring your site, you can begin your first deploy. You should see Cloudflare Pages installing
vuepress, your project dependencies, and building your site, before deploying it.
After deploying your site, you will receive a unique subdomain for your project on
*.pages.dev. Every time you commit new code to your VuePress project, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to on new pull requests, so you can preview how changes to your site look before deploying them to production.