Merge pull request #304 from massalabs/update-version-patch #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish npm package and documentation | |
on: | |
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 }} |