Skip to content

(WIP) tech: vercel integration #803

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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
52 changes: 52 additions & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Docs Preview

on:
pull_request:
branches:
- master

jobs:
deploy:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Restore Cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install
run: yarn install --frozen-lockfile

- name: Build Mosaic Docs
run: |
yarn run build:cdk
yarn run build:mosaic
yarn run build:mosaic-luxon-adapter
yarn run build:mosaic-moment-adapter
yarn run styles:built-all
yarn run build:package-design-tokens
yarn run build:mosaic-examples-module
yarn run build:mosaic-examples
yarn run build:docs-content && yarn run build:highlight && yarn run build:package-docs-content
yarn run docs:prod-build --output-path dist/mosaic-docs

- name: Vercel Deployment
id: vercel-action
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GH_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_TEAM_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
vercel-args: '--scope=ptsecurity --confirm ./dist/mosaic-docs'

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ npm-debug.log

/.angular

.ai
.ai
.vercel
15 changes: 1 addition & 14 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
{
"version": 2,
"scope": "ptsecurity",
"github": {
"enabled": false
},
"routes": [
{
"src": "/assets/(.*)",
"dest": "/assets/$1"
},
{ "src": "/(.*).js", "dest": "/$1.js" },
{ "src": "/(.*).css", "dest": "/$1.css" },
{ "src": "/(.*).svg", "dest": "/$1.svg" },
{ "src": "/(.*).json", "dest": "/$1.json" },
{ "src": "/(.*).html", "dest": "/$1.html" }
]
}
}