-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (50 loc) · 1.27 KB
/
publish-npm-doc.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
55
56
57
58
59
60
61
62
63
name: Publish npm package and documentation
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
test:
uses: ./.github/workflows/unit-test.yml
publish-npm:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
- name: Publish package on npm
run: |
npm pkg delete scripts.prepare
npm ci
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
deploy-typedoc:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Generate doc
run: |
npm ci
npm run doc
mv docs/documentation/html massa-as-sdk
- name: Deploy documentation
uses: appleboy/scp-action@master
with:
source: "./massa-as-sdk"
target: "/var/www/type-doc"
host: ${{ secrets.MASSANET_HOST }}
username: ${{ secrets.MASSANET_USERNAME }}
key: ${{ secrets.MASSANET_SSHKEY }}