forked from morganstanley/desktopJS
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.17 KB
/
release.yml
File metadata and controls
49 lines (40 loc) · 1.17 KB
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
# This workflow will do a clean install of node dependencies, build the source code, publish to npm, and deploy latest docs to GitHub pages
name: Release
on:
release:
types: [ published ]
branches: [ main ]
workflow_dispatch:
branches: [ main ]
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_VERSION: '20'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm i
- run: npm run build
- run: npm run docs
- name: Publish
if: success()
run: ./deploy.sh
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@df5cc2bfa78282ded844b354faee141f06b41865 # v4.2.0
with:
commit_message: Deploy morganstanley/desktopJS
build_dir: docs/
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}