monaco-editor/.github/workflows/website.yml

40 lines
988 B
YAML
Raw Normal View History

2021-11-17 06:27:17 +08:00
name: Publish Website
on:
push:
branches:
- main
# enable users to manually trigger with workflow_dispatch
workflow_dispatch: {}
2021-11-17 06:27:17 +08:00
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' }}
2021-11-23 04:57:39 +08:00
run: npm ci
2021-11-17 06:27:17 +08:00
- name: Build website
2021-11-17 06:33:24 +08:00
run: npm run build-website
2021-11-17 06:27:17 +08:00
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2021-11-17 06:33:24 +08:00
run: ./.github/workflows/publish-website.sh