<!DOCTYPE html><htmllang="ro"><head><metacharSet="utf-8"/><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><title>Publish the Site · Docusaurus</title><metaname="viewport"content="width=device-width"/><metaname="generator"content="Docusaurus"/><metaname="description"content=" {.docImage}"/><metaname="docsearch:version"content="1.13.0"/><metaname="docsearch:language"content="ro"/><metaproperty="og:title"content="Publish the Site · Docusaurus"/><metaproperty="og:type"content="website"/><metaproperty="og:url"content="https://docusaurus.io/"/><metaproperty="og:description"content=" {.docImage}"/><metaproperty="og:image"content="https://docusaurus.io/img/docusaurus.png"/><metaname="twitter:card"content="summary"/><metaname="twitter:image"content="https://docusaurus.io/img/docusaurus.png"/><linkrel="shortcut icon"href="/img/docusaurus.ico"/><linkrel="stylesheet"href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><linkrel="stylesheet"href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css"/><linkrel="alternate"type="application/atom+xml"href="https://docusaurus.io/blog/atom.xml"title="Docusaurus Blog ATOM Feed"/><linkrel="alternate"type="application/rss+xml"href="https://docusaurus.io/blog/feed.xml"title="Docusaurus Blog RSS Feed"/><script>
<p>Next, we'll learn how to publish the site to the WWW for everyone to browse! For the purpose of the tutorial, we'll use GitHub Pages to host our website. But you can use any static file hosting service that you want, like Netlify, Amazon S3, etc.</p>
<li>In Terminal or Git Bash, kill the web server by pressing <strong>Cmd+C</strong> or <strong>Ctrl+C</strong>.</li>
<li>In the <code>website</code> directory, run <code>npm run build</code> or <code>yarn build</code>. The command generates a <code>build</code> directory inside the <code>website</code> directory, containing HTML files (and other file types) for all of your docs and other pages. Make sure the <code>docusaurus-tutorial/website/build</code> directory is successfully created before running the next step.</li>
<li>Replace <code>USERNAME</code> with your GitHub username and run the following command.</li>
<pre><codeclass="hljs css language-sh">GIT_USER=USERNAME CURRENT_BRANCH=master USE_SSH=<spanclass="hljs-literal">true</span> npm run publish-gh-pages <spanclass="hljs-comment"># SSH</span>
<spanclass="hljs-comment"># or</span>
GIT_USER=USERNAME CURRENT_BRANCH=master npm run publish-gh-pages <spanclass="hljs-comment"># HTTPS</span>
</code></pre>
<p>The HTML files (and other file types) are pushed to the <code>gh-pages</code> branch of your repository: <ahref="https://github.com/USERNAME/docusaurus-tutorial">https://github.com/USERNAME/docusaurus-tutorial</a>.</p>
<olstart="5">
<li>Go to <ahref="https://USERNAME.github.io/docusaurus-tutorial/">https://USERNAME.github.io/docusaurus-tutorial/</a> and view your site in action!</li>
<p>Note that when you run <code>npm run start</code> again, the <code>baseUrl</code> will now be part of the path.</p>
</blockquote>
</span></div></article></div><divclass="docs-prevnext"><aclass="docs-prev button"href="/docs/ro/tutorial-create-pages"><spanclass="arrow-prev">← </span><span>Create Pages</span></a><aclass="docs-next button"href="/docs/ro/tutorial-version"><span>Add Versions</span><spanclass="arrow-next"> →</span></a></div></div></div><navclass="onPageNav"><ulclass="toc-headings"><li><ahref="#put-the-site-online">Put the Site Online</a></li></ul></nav></div><footerclass="nav-footer"id="footer"><sectionclass="sitemap"><ahref="/"class="nav-home"><imgsrc="/img/docusaurus_monochrome.svg"alt="Docusaurus"width="66"height="58"/></a><divclass="footerSection"><h5>Docs</h5><ahref="