Browse Source

Update config and deploy script

pull/1287/head
Artur Arseniev 8 years ago
parent
commit
77220c6d0a
  1. 12
      docs/.vuepress/config.js
  2. 10
      docs/deploy.sh

12
docs/.vuepress/config.js

@ -1,15 +1,17 @@
const version = require('./../../package.json').version;
const isDev = process.argv[2] === 'dev';
const devPath = 'https://localhost:8080/dist';
module.exports = {
title: 'GrapesJS',
description: 'GrapesJS documentation',
base: '/docs/',
ga: '', // Google Analytics ID
ga: 'UA-74284223-1',
serviceWorker: false, // Enable Service Worker for offline usage
head: [
['link', { rel: 'icon', href: '/logo-icon.png' }],
//['link', { rel: 'stylesheet', href: 'https://unpkg.com/grapesjs/dist/css/grapes.min.css' }], // dev https://localhost:8080/dist/css/grapes.min.css
// ['script', { src: '/grapes.min.js' }], // dev https://localhost:8080/dist/grapes.min.js
['link', { rel: 'stylesheet', href: 'https://localhost:8080/dist/css/grapes.min.css' }],
['script', { src: 'https://localhost:8080/dist/grapes.min.js' }],
['link', { rel: 'stylesheet', href: isDev ? `${devPath}/css/grapes.min.css` : `../stylesheets/grapes.min.css?v${version}` }],
['script', { src: isDev ? `${devPath}/grapes.min.js` : `../js/grapes.min.js?v${version}` }],
],
localesSKIP: {
'/': {

10
docs/deploy.sh

@ -16,17 +16,13 @@ mkdir docs-new
mv `\ls -1 ./ | grep -v docs-new` ./docs-new
# fetch the current site, remove the old docs dir and make current the new one
git clone -b gh-pages https://github.com/artf/grapesjs.git
git clone -b gh-pages https://github.com/artf/grapesjs.git tmp && mv tmp/* tmp/.* . && rm -rf tmp
rm -fR docs
mv ./docs-new ./docs
# stage all and commit
git add -A
git commit -m 'deploy docs'
# git push -f git@github.com:artf/grapesjs.git master:gh-pages
# git push -f git@github.com:artf/grapesjs.git gh-pages
surge --domain closed-harmony.surge.sh
git push git@github.com:artf/grapesjs.git gh-pages
# surge --domain grapesjs.surge.sh
cd -

Loading…
Cancel
Save