<?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: Alina Osv</title>
    <description>The latest articles on DEV Community by Alina Osv (@alinaosv).</description>
    <link>https://dev.to/alinaosv</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%2F379920%2F2553b9b7-8550-4603-b43a-bc2d148b1151.jpg</url>
      <title>DEV Community: Alina Osv</title>
      <link>https://dev.to/alinaosv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alinaosv"/>
    <language>en</language>
    <item>
      <title>Deploy create-react-app to github pages adventure</title>
      <dc:creator>Alina Osv</dc:creator>
      <pubDate>Tue, 05 May 2020 10:34:08 +0000</pubDate>
      <link>https://dev.to/alinaosv/deploy-create-react-app-to-github-pages-adventure-5857</link>
      <guid>https://dev.to/alinaosv/deploy-create-react-app-to-github-pages-adventure-5857</guid>
      <description>&lt;p&gt;This year I promised myself to create my own webpage. Without thinking twice I decided to host my website at github with some constraints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;source code should be placed at the same repo&lt;/li&gt;
&lt;li&gt;website should be hosted as user page (from root folder)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Looking for a deploy guide I figured out, that github allows to publish user page only from default branch (master) &amp;amp; doesn't allow to set custom folder as root for deployed website. Ooops 😥&lt;/p&gt;

&lt;p&gt;A quick research gave me 3 options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deploy website as project (but I wish a pretty url 🥺)&lt;/li&gt;
&lt;li&gt;leave in repo just the final build (and how to deal with the source code?! 🧐)&lt;/li&gt;
&lt;li&gt;move source files to submodules (why so difficult 🙈)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Messing around for a while and almost decided to choose the submodules option, I came across the &lt;a href="https://create-react-app.dev/docs/deployment/#github-pages"&gt;official guide to deploy create-react-app&lt;/a&gt;. Last step reminded to directly setup deploy branch (master in common).&lt;/p&gt;

&lt;p&gt;That's it! We could place source code into different branch and use master branch as build folder. So I moved the source code into dev branch &amp;amp; finally deployed &lt;a href="https://alinaosv.github.io"&gt;my page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Hope this trick will help you to save couple of hours and deploy your user page without pain😉&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>github</category>
    </item>
  </channel>
</rss>
