Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ jobs:
with:
version: 8
- name: Root
run: pnpm install
run: |
pnpm install
pnpm run package:tgz
- name: Build
working-directory: website
run: |
npm install --force
npm install
npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"editor.tabSize": 2,
"editor.formatOnSave": true,
"[javascript][typescript][typescriptreact][json]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
Expand Down
19 changes: 19 additions & 0 deletions deploy/tgz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import cp from "child_process";
import fs from "fs";

const execute = (str: string) =>
cp.execSync(str, {
cwd: `${__dirname}/..`,
stdio: "inherit",
});
execute("pnpm run build");
execute("npm pack");
Comment thread
samchon marked this conversation as resolved.
Outdated

const directory: string[] = fs.readdirSync(`${__dirname}/..`);
if (directory.includes("typia.tgz")) fs.unlinkSync(`${__dirname}/../typia.tgz`);

const found = directory.find((file) => file.endsWith(".tgz"));
if (found) {
fs.renameSync(`${__dirname}/../${found}`, `${__dirname}/../typia.tgz`);
console.log("tgz file created successfully.");
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"------------------------------------------------": "",
"package:latest": "ts-node deploy --tag latest",
"package:next": "ts-node deploy --tag next",
"package:patch": "ts-node deploy --tag patch"
"package:patch": "ts-node deploy --tag patch",
"package:tgz": "ts-node deploy/tgz.ts"
},
"repository": {
"type": "git",
Expand Down
Loading