<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mouli Bheemaneti</title>
    <description>The latest articles on DEV Community by Mouli Bheemaneti (@moulibheemaneti).</description>
    <link>https://dev.to/moulibheemaneti</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F954548%2Fc220c349-6d55-4728-a947-7e59683d0f19.png</url>
      <title>DEV Community: Mouli Bheemaneti</title>
      <link>https://dev.to/moulibheemaneti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moulibheemaneti"/>
    <language>en</language>
    <item>
      <title>Free Hosting for Your Nuxt App</title>
      <dc:creator>Mouli Bheemaneti</dc:creator>
      <pubDate>Wed, 03 Sep 2025 17:40:58 +0000</pubDate>
      <link>https://dev.to/moulibheemaneti/free-hosting-for-your-nuxt-app-p29</link>
      <guid>https://dev.to/moulibheemaneti/free-hosting-for-your-nuxt-app-p29</guid>
      <description>&lt;h2&gt;
  
  
  How to Host Your Nuxt Project on GitHub Pages
&lt;/h2&gt;

&lt;p&gt;Nuxt has quickly become one of the most popular frameworks for building modern web applications with Vue. While it offers powerful features like server-side rendering (SSR), many projects are perfectly fine being deployed as static sites. For personal projects, portfolios, or small apps, &lt;strong&gt;GitHub Pages&lt;/strong&gt; is a free and simple hosting solution.&lt;/p&gt;

&lt;p&gt;In this article, I’ll walk you through the complete process of deploying a Nuxt project to GitHub Pages.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why GitHub Pages?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free hosting&lt;/strong&gt; for public repositories.&lt;/li&gt;
&lt;li&gt;Easy integration with GitHub Actions for continuous deployment.&lt;/li&gt;
&lt;li&gt;Great for personal sites, documentation, and small apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since GitHub Pages can only serve static files (HTML, CSS, JavaScript), we need to use &lt;strong&gt;Static Site Generation (SSG)&lt;/strong&gt; in Nuxt.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Configure &lt;code&gt;nuxt.config.ts&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Inside your &lt;code&gt;nuxt.config.ts&lt;/code&gt;, make sure you disable SSR and set the correct &lt;code&gt;baseURL&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// nuxt.config.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineNuxtConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;ssr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// disable server-side rendering&lt;/span&gt;
  &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&amp;lt;your-repo-name&amp;gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// 👈 replace with your repository name&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;nitro&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;preset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;github-pages&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, if your repository is named &lt;code&gt;nuxt-portfolio&lt;/code&gt;, then your site will be hosted at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://&amp;lt;username&amp;gt;.github.io/nuxt-portfolio/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So set &lt;code&gt;baseURL: '/nuxt-portfolio/'&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Generate Static Files
&lt;/h2&gt;

&lt;p&gt;Run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn generate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will build your Nuxt project into a &lt;code&gt;dist/&lt;/code&gt; folder, containing static HTML, CSS, and JavaScript files.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Add a GitHub Actions Workflow
&lt;/h2&gt;

&lt;p&gt;To automate deployment, create a workflow file at &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here’s a complete example (for Yarn 4+ projects):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy Nuxt to GitHub Pages&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;master&lt;/span&gt;   &lt;span class="c1"&gt;# or main, depending on your repo&lt;/span&gt;

&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;   &lt;span class="c1"&gt;# allow pushing to gh-pages branch&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout code&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Setup Node.js&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v3&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;22&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Enable Corepack&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;corepack enable&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Use Yarn version from packageManager&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;corepack use yarn&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install dependencies&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yarn install --immutable&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Generate static site&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yarn generate&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy to GitHub Pages&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;peaceiris/actions-gh-pages@v3&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;github_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
          &lt;span class="na"&gt;publish_dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./dist&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This workflow will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run on every push to &lt;code&gt;master&lt;/code&gt; (or &lt;code&gt;main&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Install Node.js and Yarn.&lt;/li&gt;
&lt;li&gt;Build the project with &lt;code&gt;yarn generate&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Deploy the &lt;code&gt;dist/&lt;/code&gt; folder to the &lt;code&gt;gh-pages&lt;/code&gt; branch.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Step 4: Enable GitHub Pages
&lt;/h2&gt;

&lt;p&gt;After the first successful deployment:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your repo on GitHub → &lt;strong&gt;Settings → Pages&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Source&lt;/strong&gt;, select &lt;code&gt;gh-pages&lt;/code&gt; branch and folder &lt;code&gt;/ (root)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Save.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your site will be live in a few minutes at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://&amp;lt;username&amp;gt;.github.io/&amp;lt;repo-name&amp;gt;/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Common Pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Blank page or missing assets&lt;/strong&gt; → Check &lt;code&gt;baseURL&lt;/code&gt; in &lt;code&gt;nuxt.config.ts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission denied (403) error&lt;/strong&gt; → Ensure &lt;code&gt;permissions: contents: write&lt;/code&gt; is set in the workflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong Yarn version&lt;/strong&gt; → Enable Corepack so GitHub Actions installs the correct Yarn version.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Hosting your Nuxt project on GitHub Pages is a cost-effective and straightforward solution for static sites. With GitHub Actions, every push to your repo can automatically rebuild and redeploy your site.&lt;/p&gt;

&lt;p&gt;This setup is perfect for personal portfolios, documentation, or lightweight apps. If your app eventually needs server-side rendering or API integrations, you can later migrate to platforms like Vercel or Netlify.&lt;/p&gt;




&lt;p&gt;✨ That’s it! You’ve now got your Nuxt app running on GitHub Pages for free.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>learning</category>
      <category>frontend</category>
    </item>
    <item>
      <title>First post</title>
      <dc:creator>Mouli Bheemaneti</dc:creator>
      <pubDate>Wed, 02 Nov 2022 08:58:49 +0000</pubDate>
      <link>https://dev.to/moulibheemaneti/first-post-320d</link>
      <guid>https://dev.to/moulibheemaneti/first-post-320d</guid>
      <description>&lt;p&gt;For the first time I'm here in dev.to. I don't know how to use it but I hope this platform teaches me something new.&lt;/p&gt;

</description>
      <category>moulibheemaneti</category>
      <category>flutter</category>
      <category>devjournal</category>
      <category>flutterdev</category>
    </item>
  </channel>
</rss>
