Skip to content

Commit 1b79291

Browse files
committed
chore: udpate workflows
1 parent 1d20142 commit 1b79291

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,29 @@ jobs:
138138
if: ${{ steps.do-publish.outputs.tag == 'latest' }}
139139
run: |
140140
yarn docs:html
141-
- name: Publish docs
142-
uses: peaceiris/actions-gh-pages@v4
141+
- name: Upload docs artifact
142+
uses: actions/upload-pages-artifact@v5
143143
if: ${{ steps.do-publish.outputs.tag == 'latest' }}
144144
with:
145-
github_token: ${{ secrets.GITHUB_TOKEN }}
146-
publish_dir: ./docs
145+
path: ./docs
146+
147+
publish-docs:
148+
name: Publish docs to GitHub Pages
149+
needs:
150+
- prepare
151+
if: ${{ needs.prepare.outputs.tag == 'latest' }}
152+
runs-on: ubuntu-latest
153+
permissions:
154+
pages: write # to deploy to Pages
155+
id-token: write # to verify the deployment originates from an appropriate source
156+
environment:
157+
name: github-pages
158+
url: ${{ steps.deployment.outputs.page_url }}
159+
160+
steps:
161+
- name: Deploy to GitHub Pages
162+
id: deployment
163+
uses: actions/deploy-pages@v5
147164

148165
publish:
149166
name: Publish to NPM

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If you want to make a contribution, feel free to open a PR.
3636
## Usage
3737

3838
```javascript
39-
const { Hyperdeck, Commands } = require('hyperdeck-connection')
39+
import { Hyperdeck, Commands } from 'hyperdeck-connection'
4040
const myHyperdeck = new Hyperdeck()
4141

4242
myHyperdeck.connect('192.168.168.100')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"unit": "vitest --run",
4343
"test": "run lint && run unit",
4444
"watch": "vitest --watch",
45-
"cov": "vitest --coverage && open-cli coverage/lcov-report/index.html",
45+
"cov": "vitest --coverage --run && open-cli coverage/lcov-report/index.html",
4646
"cov-open": "open-cli coverage/lcov-report/index.html",
4747
"docs": "run docs:html && open-cli docs/index.html",
4848
"docs:test": "run docs:html",

vitest.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'vitest/config'
2+
3+
export default defineConfig({
4+
test: {
5+
coverage: {
6+
provider: 'v8',
7+
reporter: ['text', 'lcov', 'html'],
8+
},
9+
},
10+
})

0 commit comments

Comments
 (0)