Author -  Sai gowtham

How to deploy a nuxt app to GitHub Pages

In this tutorial, we are going to learn about how to host your nuxt app to GitHub pages by using the command line.

Deploying to GitHub Pages

  1. First, create a new repository in GitHub and push your nuxt app to it.

nuxt app to GitHub repository

  1. Now, open your nuxt.config.js file and add the following configuration to the export default object.
nuxt.config.js
export default {
   mode: 'static',
   router: {
      base: '/your-github-repository-name/'
   },
   // other config goes here
}
  1. Install the gh-pages package by using the below command.
npm install gh-pages --save-dev
  1. Add the following deploy commands to your package.json file scripts object.
"predeploy": "nuxt generate",
"deploy": "gh-pages -d dist"
  1. Run the following command to successfully deploy your app to GitHub pages.
npm run deploy

Now, open your nuxt app GitHub repository and click on the settings tab, if your scroll down to the GitHub Pages section you will see a nuxt app live URL like this.

nuxt app deploy url GitHub pages

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2023 (Beginner + Advanced)
JavaScript - The Complete Guide 2023 (Beginner + Advanced)
116,648 students enrolled
52 hours of video content
$14.99 FROM UDEMY
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
631,582 students enrolled
49 hours of video content
$24.99 FROM UDEMY
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
203,937 students enrolled
31.5 hours of video content
$14.99 FROM UDEMY