Skip to content

Commit

Permalink
ci: update website flow deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Mar 3, 2024
1 parent 58f6d61 commit 0b2769f
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 70 deletions.
32 changes: 6 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,29 +106,9 @@ jobs:
package.json
packages/*/package.json
publish-pages:
runs-on: ubuntu-latest
needs: deploy-packages
if: ${{ github.event_name != 'pull_request' && (contains(github.ref, 'master') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')) }}

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@v2
with:
name: packages
- name: Install dependencies
run: yarn install --immutable
- name: Publish pages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn docs:publish
- name: "Trigger Website workflow"
run: |
curl -X POST https://api.github.com/repos/tsedio/tsed-cli/actions/workflows/website.yml/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-H 'Authorization: Bearer ${{secrets.GH_TOKEN}}' \
--data '{"ref": "production"}'
38 changes: 38 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Website

on:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
publish-docs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.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 --immutable --network-timeout 500000
- name: Build pages
env:
CI: true
run: yarn api:build && yarn docs:build
- name: Publish pages
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn docs:publish

2 changes: 1 addition & 1 deletion packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@
"@tsed/core": ">=7.14.2",
"@tsed/di": ">=7.14.2"
}
}
}
2 changes: 1 addition & 1 deletion packages/cli-generate-http-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
"optional": false
}
}
}
}
2 changes: 1 addition & 1 deletion packages/cli-generate-swagger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
"optional": false
}
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@
},
"dependencies": {
"tslib": "2.3.1"
},
"peerDependencies": {}
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@
},
"dependencies": {
"tslib": "2.3.1"
},
"peerDependencies": {}
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-mocha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@
},
"dependencies": {
"tslib": "2.3.1"
},
"peerDependencies": {}
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-mongoose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
"cross-env": "7.0.3",
"eslint": "8.22.0",
"jest": "29.5.0"
},
"peerDependencies": {}
}
}
}
2 changes: 1 addition & 1 deletion packages/cli-plugin-oidc-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"@tsed/cli": "5.0.3",
"@tsed/cli-core": "5.0.3"
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-passport/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
"cross-env": "7.0.3",
"eslint": "8.22.0",
"jest": "29.5.0"
},
"peerDependencies": {}
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
"cross-env": "7.0.3",
"eslint": "8.22.0",
"jest": "29.5.0"
},
"peerDependencies": {}
}
}
}
2 changes: 1 addition & 1 deletion packages/cli-plugin-typegraphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"@tsed/cli": "5.0.3",
"@tsed/cli-core": "5.0.3"
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-plugin-typeorm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
"cross-env": "7.0.3",
"eslint": "8.22.0",
"jest": "29.5.0"
},
"peerDependencies": {}
}
}
}
5 changes: 2 additions & 3 deletions packages/cli-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@
"cross-env": "7.0.3",
"eslint": "8.22.0",
"jest": "29.5.0"
},
"peerDependencies": {}
}
}
}
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@
"@tsed/openspec": ">=7.14.2",
"@tsed/schema": ">=7.14.2"
}
}
}
6 changes: 2 additions & 4 deletions tools/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@
"@tsed/jest-config": "5.0.3",
"cross-env": "7.0.3",
"jest": "29.5.0"
},
"dependencies": {},
"peerDependencies": {}
}
}
}
6 changes: 2 additions & 4 deletions tools/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@
"devDependencies": {
"cross-env": "7.0.3",
"jest": "29.5.0"
},
"dependencies": {},
"peerDependencies": {}
}
}
}
6 changes: 2 additions & 4 deletions tools/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@
"@tsed/jest-config": "5.0.3",
"cross-env": "7.0.3",
"jest": "29.5.0"
},
"dependencies": {},
"peerDependencies": {}
}
}
}
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4492,7 +4492,7 @@ __metadata:
"@types/url-parse": "npm:^1.4.3"
"@types/uuid": "npm:8.3.4"
ajv: "npm:8.11.0"
axios: "npm:0.26.1"
axios: "npm:1.6.7"
chalk: "npm:4.1.2"
change-case: "npm:^4.1.2"
commander: "npm:9.3.0"
Expand Down Expand Up @@ -7593,7 +7593,7 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:*, axios@npm:0.26.1":
"axios@npm:*":
version: 0.26.1
resolution: "axios@npm:0.26.1"
dependencies:
Expand Down

0 comments on commit 0b2769f

Please sign in to comment.