Skip to content

Commit

Permalink
docs: fix build issue on website
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita authored and derevnjuk committed Jan 29, 2022
1 parent 7247ca3 commit fb21ad3
Show file tree
Hide file tree
Showing 10 changed files with 504 additions and 107 deletions.
44 changes: 38 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn release

publish-pages:
publish-docs:
runs-on: ubuntu-latest
needs: deploy-packages
if: ${{ github.event_name != 'pull_request' && (contains(github.ref, 'production') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')) }}
Expand All @@ -182,14 +182,17 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout 500000
- name: Build pages
env:
CI: true
run: yarn api:build && yarn vuepress:docs:build
- name: Publish pages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn docs:publish

publish-examples:
publish-refs:
runs-on: ubuntu-latest
needs: deploy-packages
if: ${{ github.event_name != 'pull_request' && (contains(github.ref, 'production') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')) }}
Expand All @@ -207,11 +210,40 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Publish examples
run: yarn install --frozen-lockfile --network-timeout 500000
- name: Build pages
env:
CI: true
run: yarn api:build && yarn vuepress:ref:build
- name: Publish pages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn examples:publish
run: yarn docs:publish
# publish-examples:
# runs-on: ubuntu-latest
# needs: deploy-packages
# if: ${{ github.event_name != 'pull_request' && (contains(github.ref, 'production') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')) }}
#
# strategy:
# matrix:
# node-version: [ 16.x ]
#
# steps:
# - uses: actions/checkout@v2
# with:
# ref: 'production'
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# - name: Install dependencies
# run: yarn install --frozen-lockfile
# - name: Publish examples
# env:
# CI: true
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# run: yarn examples:publish

29 changes: 28 additions & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
publish-pages:
publish-docs:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -20,6 +20,33 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout 500000
- name: Build pages
env:
CI: true
run: yarn api:build && yarn vuepress:docs:build
- name: Publish pages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn docs:publish
publish-refs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout 500000
- name: Build pages
env:
CI: true
run: yarn api:build && yarn vuepress:ref:build
- name: Publish pages
env:
CI: true
Expand Down
3 changes: 2 additions & 1 deletion docs-references/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const conf = settings({
themeConfig: {
shortTitle: "Ts.ED API",
htmlTitle: "<strong class=\"font-medium\"><span class='text-blue'>Ts</span>.ED API</strong>",
algolia: false
algolia: false,

}
})

Expand Down
9 changes: 5 additions & 4 deletions docs-references/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
sidebar: false
meta:
- name: description
content: Api Reference of Ts.ED. Use decorator to build your model and map data.
- name: keywords
content: api reference model decorators ts.ed express typescript node.js javascript jsonschema json mapper serialization deserialization
- name: description
content: Api Reference of Ts.ED. Use decorator to build your model and map data.
- name: keywords
content: api reference model decorators ts.ed express typescript node.js javascript jsonschema json mapper serialization deserialization
---
# Api Reference

Expand Down
11 changes: 0 additions & 11 deletions docs/.vuepress/components/HomeBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts">
</CodeSandbox>

</div>

<div>
<Button
href="https://codesandbox.io/embed/tsed-mongoose-example-omkbm?fontsize=14&hidenavigation=1&theme=dark"
rounded="medium"
bg-color="white-button"
color="blue">
Live demo
</Button>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/.vuepress/config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ module.exports = ({ title, description, base = "", url, apiRedirectUrl = "", the
children: [
{
title: "Migrate from v5",
path: base + "/getting-started/migration-from-v5"
path: `${base}/getting-started/migration-from-v5`
},
{
title: "Migrate from Express.js",
path: base + "/getting-started/migrate-from-express"
path: `${base}/getting-started/migrate-from-express`
}
]
},
Expand Down Expand Up @@ -469,7 +469,7 @@ module.exports = ({ title, description, base = "", url, apiRedirectUrl = "", the
},
{
label: "Chat with us",
url: "https://gitter.im/Tsed-io/community"
url: "https://api.tsed.io/rest/slack/tsedio/tsed"
},
{
label: "Contribution guide",
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
"millify": "^3.5.0"
},
"devDependencies": {
"@tsed/markdown-it-symbols": "3.19.2",
"@tsed/markdown-it-symbols": "3.19.5",
"vue-analytics": "5.22.1",
"vuepress": "1.8.2",
"vuepress-theme-tsed": "3.19.2"
"vuepress": "1.9.5",
"vuepress-theme-tsed": "3.19.5"
},
"directories": {
"packages": "packages",
Expand Down
Loading

0 comments on commit fb21ad3

Please sign in to comment.