Deploy website

Deploy website version based on e95c3a87b7
This commit is contained in:
Website Deployment Script 2017-10-26 23:13:03 +00:00
parent e95c3a87b7
commit c85228b830
14 changed files with 100 additions and 90 deletions

View file

@ -9,7 +9,7 @@
<li><a href="/docs/en/commands.html#docusaurus-start-port-number"><code>yarn run start</code></a>: build and serve the website from a local server</li>
<li><a href="/docs/en/commands.html#docusaurus-examples"><code>yarn run examples</code></a>: create example configuration files</li>
</ul>
<h2><a class="anchor" name="running-from-the-command-line"></a>Running from the command line <a class="hash-link" href="#running-from-the-command-line">#</a></h2>
<h2><a class="anchor" aria-hidden="true" name="running-from-the-command-line"></a><a href="#running-from-the-command-line" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Running from the command line</h2>
<p>The scripts can be run using either Yarn or npm. If you've already gone through our Getting Started guide, you may already be familiar with the <code>start</code> command. It's the command that tells Docusaurus to run the <code>docusaurus-start</code> script which generates the site and starts up a server, and it's usually invoked like so:</p>
<pre><code class="hljs">yarn <span class="hljs-keyword">run</span><span class="bash"> start
</span></code></pre>
@ -17,17 +17,17 @@
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> start
</span></code></pre>
<p>To run a particular script, just replace the <code>start</code> command in the examples above with the command associated with your script.</p>
<h2><a class="anchor" name="using-arguments"></a>Using arguments <a class="hash-link" href="#using-arguments">#</a></h2>
<h2><a class="anchor" aria-hidden="true" name="using-arguments"></a><a href="#using-arguments" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Using arguments</h2>
<p>Some commands support optional arguments. For example, to start a server on port 8080, you can specify the <code>--port</code> argument when running <code>start</code>:</p>
<pre><code class="hljs">yarn <span class="hljs-keyword">run</span><span class="bash"> start --port 8080
</span></code></pre>
<p>If you run Docusaurus using npm, you can still use the command line arguments by inserting a <code>--</code> between <code>npm run &lt;command&gt;</code> and the command arguments:</p>
<pre><code class="hljs">npm <span class="hljs-keyword">run</span><span class="bash"> start -- --port 8080
</span></code></pre>
<h2><a class="anchor" name="configuration"></a>Configuration <a class="hash-link" href="#configuration">#</a></h2>
<h2><a class="anchor" aria-hidden="true" name="configuration"></a><a href="#configuration" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configuration</h2>
<p>These scripts are set up under the <code>&quot;scripts&quot;</code> key in your <code>website/package.json</code> file as part of the installation process. If you need help setting them up again, please refer to the <a href="/docs/en/installation.html">Installation guide</a>.</p>
<p>Docusaurus provides some default mappings to allow you to run commands following Node conventions. Instead of typing <code>docusaurus-start</code> every time, you can type <code>yarn run start</code> or <code>npm start</code> to achieve the same.</p>
<h2><a class="anchor" name="commands"></a>Commands <a class="hash-link" href="#commands">#</a></h2>
<h2><a class="anchor" aria-hidden="true" name="commands"></a><a href="#commands" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Commands</h2>
<ul>
<li><a href="#docusaurus-build"><code>docusaurus-build</code></a></li>
<li><a href="#docusaurus-examples-feature"><code>docusaurus-examples [feature]</code></a></li>
@ -38,17 +38,17 @@
<li><a href="#docusaurus-write-translations"><code>docusaurus-write-translations</code></a></li>
</ul>
<hr>
<h2><a class="anchor" name="reference"></a>Reference <a class="hash-link" href="#reference">#</a></h2>
<h3><a class="anchor" name="docusaurus-build"></a><code>docusaurus-build</code> <a class="hash-link" href="#docusaurus-build">#</a></h3>
<h2><a class="anchor" aria-hidden="true" name="reference"></a><a href="#reference" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Reference</h2>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-build"></a><a href="#docusaurus-build" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-build</code></h3>
<p>Alias: <code>build</code>.</p>
<p>Generates the static website, applying translations if necessary. Useful for building the website prior to deployment.</p>
<p>See also <a href="/docs/en/commands.html#docusaurus-start-port-number"><code>docusaurus-start</code></a>.</p>
<hr>
<h3><a class="anchor" name="docusaurus-examples-feature"></a><code>docusaurus-examples [feature]</code> <a class="hash-link" href="#docusaurus-examples-feature">#</a></h3>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-examples-feature"></a><a href="#docusaurus-examples-feature" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-examples [feature]</code></h3>
<p>Alias: <code>examples</code></p>
<p>When no feature is specified, sets up a minimally configured example website in your project. This command is covered in depth in the <a href="/docs/en/site-preparation.html">Site Preparation guide</a>. Specify a feature <code>translations</code> or <code>versions</code> to generate the extra example files for that feature.</p>
<hr>
<h3><a class="anchor" name="docusaurus-publish"></a><code>docusaurus-publish</code> <a class="hash-link" href="#docusaurus-publish">#</a></h3>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-publish"></a><a href="#docusaurus-publish" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-publish</code></h3>
<p>Alias: <code>publish-gh-pages</code></p>
<p><a href="/docs/en/commands.html#docusaurus-build">Builds</a>, then deploys the static website to GitHub Pages. This command is meant to be run during the deployment step in Circle CI, and therefore expects a few environment variables to be defined:</p>
<ul>
@ -60,21 +60,21 @@
</ul>
<p>You can learn more about configuring automatic deployments with CircleCI in the <a href="publishing.md">Publishing guide</a>.</p>
<hr>
<h3><a class="anchor" name="docusaurus-rename-version-currentversion-newversion"></a><code>docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;</code> <a class="hash-link" href="#docusaurus-rename-version-currentversion-newversion">#</a></h3>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-rename-version-currentversion-newversion"></a><a href="#docusaurus-rename-version-currentversion-newversion" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-rename-version &lt;currentVersion&gt; &lt;newVersion&gt;</code></h3>
<p>Alias: <code>rename-version</code></p>
<p>Renames an existing version of the docs to a new version name.</p>
<p>See the <a href="/docs/en/versioning.html#renaming-existing-versions">Versioning guide</a> to learn more.</p>
<hr>
<h3><a class="anchor" name="docusaurus-start-port-number"></a><code>docusaurus-start [--port &lt;number&gt;]</code> <a class="hash-link" href="#docusaurus-start-port-number">#</a></h3>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-start-port-number"></a><a href="#docusaurus-start-port-number" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-start [--port &lt;number&gt;]</code></h3>
<p>Alias: <code>start</code>.</p>
<p>This script will build the static website, apply translations if necessary, and then start a local server. The website will be served from port 3000 by default.</p>
<hr>
<h3><a class="anchor" name="docusaurus-version-version"></a><code>docusaurus-version &lt;version&gt;</code> <a class="hash-link" href="#docusaurus-version-version">#</a></h3>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-version-version"></a><a href="#docusaurus-version-version" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-version &lt;version&gt;</code></h3>
<p>Alias: <code>version</code></p>
<p>Generates a new version of the docs. This will result in a new copy of your site being generated and stored in its own versioned folder. Useful for capturing snapshots of API docs that map to specific versions of your software. Accepts any string as a version number.</p>
<p>See the <a href="/docs/en/versioning.html">Versioning guide</a> to learn more.</p>
<hr>
<h3><a class="anchor" name="docusaurus-write-translations"></a><code>docusaurus-write-translations</code> <a class="hash-link" href="#docusaurus-write-translations">#</a></h3>
<h3><a class="anchor" aria-hidden="true" name="docusaurus-write-translations"></a><a href="#docusaurus-write-translations" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>docusaurus-write-translations</code></h3>
<p>Alias: <code>write-translations</code></p>
<p>Writes the English for any strings that need to be translated into an <code>website/i18n/en.json</code> file. The script will go through every file in <code>website/pages/en</code> and through the <code>siteConfig.js</code> file and other config files to fetch English strings that will then be translated on Crowdin. See the <a href="/docs/en/translation.html">Translation guide</a> to learn more.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="versioning.html">← Versioning</a><a class="docs-next button" href="api-pages.html">Pages and Styles →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="