Skip to content

Publish npm package and documentation #13

Publish npm package and documentation

Publish npm package and documentation #13

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 }}