Skip to content

Commit

Permalink
Create workflow for GH Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehorvat committed Mar 3, 2024
1 parent d9c2d9a commit 270095b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This workflow deploys the repository to GitHub Pages when master branch is updated.

name: Deploy to GitHub Pages
on:
push:
branches: [master]
permissions:
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm run build
- uses: actions/upload-pages-artifact@v1
with:
path: demo/dist
- uses: actions/deploy-pages@v2
6 changes: 6 additions & 0 deletions demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": false
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"scripts": {
"build": "tsc",
"prebuild": "rimraf dist",
"test": "webpack serve --mode development --config demo/webpack.config.js"
"demo-start": "webpack serve --mode development --config demo/webpack.config.js",
"demo-build": "webpack --mode production --config demo/webpack.config.js"
},
"dependencies": {},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
"declaration": true,
"jsx": "react"
},
"include": ["lib"],
"exclude": ["node_modules"]
"include": ["lib"]
}

0 comments on commit 270095b

Please sign in to comment.