Update website versioning workflow

This commit is contained in:
Matej Sima 2019-06-06 15:45:45 +02:00
parent 0e82c183ec
commit 0e6a3f6721
8 changed files with 13 additions and 14 deletions

View File

@ -15,11 +15,9 @@ stages:
- cd gitlab-pages/website - cd gitlab-pages/website
- npm install - npm install
script: script:
- rm -rf versioned_docs/version-next
- rm versioned_sidebars/version-next-sidebars.json
- node removeNext.js
- npm run version next - npm run version next
- npm run build - npm run build
after_script:
- cd ../.. - cd ../..
- cp -r gitlab-pages/website/build/ligo public - cp -r gitlab-pages/website/build/ligo public
artifacts: artifacts:
@ -121,6 +119,8 @@ stages:
- master - master
# Pages are deployed from both master & dev, be careful not to override 'next'
# in case something gets merged into 'dev' while releasing.
pages: pages:
<<: *website_build <<: *website_build
# only: # only:

View File

@ -10,3 +10,5 @@ website/build/
website/yarn.lock website/yarn.lock
website/node_modules website/node_modules
website/i18n/* website/i18n/*
website/versioned_docs/version-next
website/versioned_sidebars/version-next-sidebars.json

View File

@ -6,6 +6,8 @@
"publish-gh-pages": "docusaurus-publish", "publish-gh-pages": "docusaurus-publish",
"write-translations": "docusaurus-write-translations", "write-translations": "docusaurus-write-translations",
"version": "docusaurus-version", "version": "docusaurus-version",
"preversion": "node preversion.js",
"postversion": "node postversion.js",
"rename-version": "docusaurus-rename-version" "rename-version": "docusaurus-rename-version"
}, },
"devDependencies": { "devDependencies": {

View File

@ -28,7 +28,6 @@ function Versions(props) {
<header className="postHeader"> <header className="postHeader">
<h1>{siteConfig.title} Versions</h1> <h1>{siteConfig.title} Versions</h1>
</header> </header>
<p>New versions of this project are released every so often.</p>
<h3 id="latest">Current version (Stable)</h3> <h3 id="latest">Current version (Stable)</h3>
<table className="versions"> <table className="versions">
<tbody> <tbody>
@ -53,10 +52,6 @@ function Versions(props) {
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>
This is the version that is configured automatically when you first
install this project.
</p>
<h3 id="rc">Pre-release versions</h3> <h3 id="rc">Pre-release versions</h3>
<table className="versions"> <table className="versions">
<tbody> <tbody>
@ -78,14 +73,13 @@ function Versions(props) {
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Other text describing this section.</p>
<h3 id="archive">Past Versions</h3> <h3 id="archive">Past Versions</h3>
<p>Here you can find previous versions of the documentation.</p> <p>Here you can find previous versions of the documentation.</p>
<table className="versions"> <table className="versions">
<tbody> <tbody>
{versions.map( {versions.map(
version => version =>
version !== latestVersion && ( version !== latestVersion && version !== "next" && (
<tr> <tr>
<th>{version}</th> <th>{version}</th>
<td> <td>

View File

@ -0,0 +1 @@
require('./preversion');

View File

@ -34,4 +34,6 @@ ligo --help
For now, please refer to the steps described in the [Dockerfile](https://github.com/stove-labs/granary/blob/develop/docker/ligo/Dockerfile). For now, please refer to the steps described in the [Dockerfile](https://github.com/stove-labs/granary/blob/develop/docker/ligo/Dockerfile).
## next-2

View File

@ -1,3 +1 @@
[ ["0.0.1"]
"next"
]