Skip to content

Commit

Permalink
ci: automatic deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Aug 31, 2024
1 parent fcc5f4a commit 36bd53d
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy example

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deployt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4

- name: Install & Build
run: |
pnpm install
pnpm build
- name: Generate example
run: pnpm run example

- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
pnpm run deploy -u "github-actions-bot <[email protected]>"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ coverage
.custom-report-directory
.test-plugin
.DS_store
example
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@
"scripts": {
"build": "rm -rf ./dist && tsc --project tsconfig.build.json && cp src/*.css dist",
"test": "vitest --coverage",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"example": "node scripts/generate-example.mjs",
"deploy": "touch example/.nojekyll && gh-pages --dist example --dotfiles true"
},
"peerDependencies": {
"vite": ">=4"
},
"devDependencies": {
"@types/node": "^22.4.1",
"@vitest/coverage-v8": "^2.0.5",
"gh-pages": "^6.1.1",
"magic-string": "^0.30.11",
"typescript": "^5.5.4",
"vite": "^5.4.0",
Expand Down
Loading

0 comments on commit 36bd53d

Please sign in to comment.