forked from microsoft/vscode-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
1,120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
out | ||
_build | ||
node_modules | ||
|
||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const gulp = require('gulp') | ||
const $ = require('shelljs') | ||
|
||
const GITHUB_TOKEN = process.env['GITHUB_TOKEN'] | ||
if (!GITHUB_TOKEN) { | ||
$.echo('This script clones vscode-website and requires access token') | ||
$.exit(1) | ||
} | ||
|
||
const URL = `https://${GITHUB_TOKEN}@github.com/microsoft/vscode-website` | ||
|
||
gulp.task('clone-repo', done => { | ||
if (!$.which('git')) { | ||
$.echo('This command requires git') | ||
$.exit(1) | ||
done() | ||
} | ||
|
||
// Go to _build | ||
if (!$.test('-e', '_build')) { | ||
$.mkdir('_build') | ||
} | ||
$.cd('_build') | ||
|
||
// Clone prod branch of vscode-website | ||
if (!$.test('-e', 'vscode-website')) { | ||
$.exec(`git clone --depth=1 --branch=prod ${URL}`) | ||
} | ||
|
||
// Copy over MD/asset files | ||
$.mkdir('vscode-website/vscode-docs') | ||
$.cp('-R', ['../blogs', '../docs', '../images', '../release-notes', '../tutorials'], 'vscode-website/vscode-docs') | ||
|
||
// Go to vscode-website | ||
$.cd('vscode-website') | ||
// Run setup to fetch vscode-website-dist | ||
$.exec(`scripts/setup.sh ${GITHUB_TOKEN}`) | ||
// Run build to sync changes to vscode-website-dist | ||
$.exec(`scripts/build.sh`) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.