Skip to content

Commit 91daaa0

Browse files
build types to branch
1 parent 47b6b08 commit 91daaa0

3 files changed

Lines changed: 38 additions & 1 deletion

File tree

.github/workflows/types.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Deploy Types
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build types
28+
run: npm run build:types
29+
30+
- name: Deploy to 'types' branch
31+
uses: JamesIves/github-pages-deploy-action@v4
32+
with:
33+
branch: types
34+
folder: types
35+
clean: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ index.html
55
/fsedit/index.html
66
/.idea/
77
*.iml
8+
/types/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"lint": "eslint .",
1717
"fix": "eslint . --fix",
1818
"clean": "rimraf public/script",
19-
"publish": "npm run clean && npm run bundle && gh-pages deploy -d . -s \"{!(node_modules)/**/*.html,*.html,public/**/*,CNAME,_config.yml,robots.txt,LICENSE,.nojekyll}\" -m \"update page\""
19+
"publish": "npm run clean && npm run bundle && gh-pages deploy -d . -s \"{!(node_modules)/**/*.html,*.html,public/**/*,CNAME,_config.yml,robots.txt,LICENSE,.nojekyll}\" -m \"update page\"",
20+
"build:types": "tsc --emitDeclarationOnly --declaration --outDir types"
2021
},
2122
"repository": {
2223
"type": "git",

0 commit comments

Comments
 (0)