Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Implement versioning #132

Merged
merged 2 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected] # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
uses: actions/[email protected]
with:
persist-credentials: false

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
- name: Install and Build 🔧
run: |
npm install
npm run check-links
npm run build
cd .vuepress/dist
echo 'docs.cosmwasm.com' > CNAME
npm run check-links;
echo 'docs.cosmwasm.com' > CNAME;
mkdir -p ~/output/public;
cp -r .vuepress/public/* ~/output;
while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build); \
mkdir -p ~/output/$${path_prefix}; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/; \
cp ~/output/$${path_prefix}/index.html ~/output; \
done < versions;

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: .vuepress/dist
BRANCH: gh-pages
FOLDER: ~/output/
28 changes: 19 additions & 9 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module.exports = {
theme: "cosmos",
title: "CosmWasm Documentation",
base: process.env.VUEPRESS_BASE || "/",
locales: {
"/": {
lang: "en-US"
},
},
head: [
['link', { rel: 'icon', href: '/logo/SVG/CosmWasm Favicon.svg' }]
['link', { rel: 'icon', href: '/logo/SVG/CosmWasm_Favicon_Full.svg' }]
],
themeConfig: {
custom: true,
Expand All @@ -16,13 +17,23 @@ module.exports = {
docsRepo: "CosmWasm/docs",
docsDir: "/",
logo: {
src: "/logo/SVG/CosmWasm Logo.svg",
src: "/logo/SVG/CosmWasm_Logo.svg",
},
algolia: {
id: "BH4D9OD16A",
key: "abeca9781b806ca955a7e0f1ee95d003",
index: "cosmwasm_docs"
},
versions: [
{
"label": "v0.13",
"key": "v0.13"
},
{
"label": "v0.12",
"key": "v0.12"
}
],
topbar: {
banner: false
},
Expand Down Expand Up @@ -234,13 +245,12 @@ module.exports = {
]
}
},
plugins: [
"sitemap",
{
hostname: "https://docs.cosmwasm.com"
},
"check-md", {
plugins: {
"check-md": {
pattern: "**/*.md"
},
]
'sitemap': {
hostname: 'https://docs.cosmwasm.com'
},
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
"homepage": "https://github.com/CosmWasm/docs",
"dependencies": {
"vuepress-theme-cosmos": "1.0.173"
"vuepress-plugin-sitemap": "^2.3.1",
"vuepress-theme-cosmos": "1.0.179"
},
"devDependencies": {
"filehound": "^1.17.4",
Expand Down
2 changes: 2 additions & 0 deletions versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v0.12 v0.12
master master