-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathmaster-publish-gh-pages-and-npm.yml
More file actions
47 lines (46 loc) · 1.66 KB
/
master-publish-gh-pages-and-npm.yml
File metadata and controls
47 lines (46 loc) · 1.66 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
name: Deploy and Publish Action WebRTC JS SDK
on:
push:
branches:
- master
jobs:
publish-ubuntu-build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # Needed for OIDC publishing
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Use Node.js
uses: actions/setup-node@v5
with:
node-version: 24
- name: Build AWS SDK
working-directory: ./aws-sdk-build
run: |
npm install
npm run build
rm -rf ../examples/*-kvswebrtc.js
mv dist/*-kvswebrtc.js ../examples
- name: Install dependencies
run: npm install
- name: Run release
run: npm run release
- name: Deploy to Github pages
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
folder: dist
branch: gh-pages
clean: true
clean-exclude: develop/
- name: Delete extra directories
run: |
# Delete the examples
rm -rf examples dist/examples
# Remove the infra to build the AWS SDK v3 browser script
rm -rf aws-sdk-build
- name: Deploy to npm packages
uses: JS-DevTools/npm-publish@v4
# Don't run this step for forks, only in the original repo
if: github.repository == 'awslabs/amazon-kinesis-video-streams-webrtc-sdk-js'