mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Add publish website workflow
This commit is contained in:
parent
903a92c7bb
commit
6f2dc28949
2 changed files with 40 additions and 2 deletions
38
.github/workflows/website.yml
vendored
Normal file
38
.github/workflows/website.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: Publish Website
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-website:
|
||||||
|
name: Publish Website
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 14
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
id: cacheNodeModules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: '**/node_modules'
|
||||||
|
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: ${{ runner.os }}-cacheNodeModules-
|
||||||
|
|
||||||
|
- name: Install node modules (1)
|
||||||
|
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build website
|
||||||
|
run: npm run build-website-ci
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: git push origin gh-pages --force
|
||||||
|
working-directory: ../monaco-editor-website
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-website": "node ./build/website.js && npm run typedoc",
|
"build-website": "node ./build/website.js && npm run typedoc",
|
||||||
|
"build-website-ci": "node ./build/website.js && npm run typedoc && node ./build/prepare-website-branch.js",
|
||||||
"import-typescript": "node ./build/importTypescript.js",
|
"import-typescript": "node ./build/importTypescript.js",
|
||||||
"playwright-install": "node ./node_modules/playwright/install.js",
|
"playwright-install": "node ./node_modules/playwright/install.js",
|
||||||
"playwright-install-deps": "playwright install-deps",
|
"playwright-install-deps": "playwright install-deps",
|
||||||
|
|
@ -20,8 +21,7 @@
|
||||||
"smoketest": "node ./test/smoke/runner.js",
|
"smoketest": "node ./test/smoke/runner.js",
|
||||||
"test": "node ./test/unit/all.js",
|
"test": "node ./test/unit/all.js",
|
||||||
"typedoc": "cd website/typedoc && \"../../node_modules/.bin/typedoc\" --options ./typedoc.json",
|
"typedoc": "cd website/typedoc && \"../../node_modules/.bin/typedoc\" --options ./typedoc.json",
|
||||||
"watch": "tsc -w -p ./src",
|
"watch": "tsc -w -p ./src"
|
||||||
"website": "node ./build/website.js && npm run typedoc && node ./build/prepare-website-branch.js"
|
|
||||||
},
|
},
|
||||||
"typings": "./esm/vs/editor/editor.api.d.ts",
|
"typings": "./esm/vs/editor/editor.api.d.ts",
|
||||||
"module": "./esm/vs/editor/editor.main.js",
|
"module": "./esm/vs/editor/editor.main.js",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue