forked from hylyh/node-mastodon
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.55 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Run Tests and Generate Docs
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "latest"
- name: Install Dependencies
run: npm install
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Run Tests
run: bun test
- name: Build Documentation
uses: andstor/jsdoc-action@v1
with:
source_dir: ./lib # Replace with your source directory
output_dir: ./docs # Output directory
config_file: jsdoc.json # Optional, if you have a JSDoc config file
template: better-docs # Optional, if you want to use a specific template
front_page: README.md # Optional, if you want a custom front page
- name: Upload Documentation as Artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: ./docs/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.TUSK_DEPLOY_TOKEN }}
publish_dir: ./docs/