Deploy a Gridsome site
is a Vue.js powered Jamstack framework for building static generated websites and applications that are fast by default. In this guide, you will create a new Gridsome project and deploy it using Cloudflare Pages. You will use the , a command line tool for creating new Gridsome projects.
@gridsome/cli by running the following command in your terminal:
$ npm install --global @gridsome/cli
Set up a new project
With Gridsome installed, set up a new project by running
gridsome create. The
create command accepts a name that defines the directory of the project created and an optional starter kit name. You can review more starters in the .
$ npx gridsome create my-gridsome-website
Before you continue
Create a GitHub repository
Create a new GitHub repository by visiting . After creating a new repository, go to your newly created project directory to prepare and push your local application to GitHub by running the following commands in your terminal:
$ 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:
npx gridsome build
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 Gridsome 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.