File tree Expand file tree Collapse file tree 3 files changed +74
-8
lines changed
Expand file tree Collapse file tree 3 files changed +74
-8
lines changed Original file line number Diff line number Diff line change 1- name : Publish library package to npmjs
2- on :
3- push :
4- tags :
5- - " *"
1+ name : Scalable Pixel Streaming Frontend Release Workflow Pipeline
2+
3+ # Start our pipeline when we create a new tag on the master branch
4+ on :
5+ release :
6+ types : [published]
7+
68jobs :
7- build :
9+ # Build NPM Package
10+ build-npm :
811 runs-on : ubuntu-latest
912 defaults :
1013 run :
11- working-directory : ./SPS
14+ working-directory : ./library
1215 steps :
1316 - uses : actions/checkout@v3
1417 - uses : actions/setup-node@v3
1922 - run : npm run build
2023 - run : npm publish --access public
2124 env :
22- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
25+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Scalable Pixel Streaming Frontend Tag Workflow Pipeline
2+
3+ # Start our pipeline when we create a new tag on the master branch
4+ on :
5+ push :
6+ tags :
7+ - ' *'
8+
9+ # Assign an environment variable that we can use for the version of the Scalable Pixel Streaming Frontend that we are tagging
10+ env :
11+ VERSION : ${{ github.ref_name }}
12+ DOCKER_USER : ${{ secrets.DOCKER_USERNAME }}
13+ DOCKER_TOKEN : ${{ secrets.DOCKER_ACCESS_KEY }}
14+
15+ jobs :
16+
17+ # Build Library
18+ build-library :
19+
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+
24+ # remove unneeded pieces from runner to free up space
25+ - name : Free up some space
26+ run : |
27+ sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
28+ sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
29+
30+ # Clone the source code on the runner
31+ - name : Clone repository
32+ uses : actions/checkout@v3
33+
34+ # Login to Docker
35+ - name : Docker login
36+ run : docker login -u $DOCKER_USER -p $DOCKER_TOKEN
37+
38+ # Set up Node js for npm
39+ - name : Setup Nodejs
40+ uses : actions/setup-node@v3
41+
42+ # Build the Scalable Pixel Streaming Frontend Library and Example
43+ - name : Build SPS Frontend
44+ run : |
45+ cd ./examples/typescript
46+ npm run build-all
47+
48+ # Build the Scalable Pixel Streaming Frontend Docker image from the dist directories of the packages
49+ - name : Build the Scalable Pixel Streaming Frontend Docker image and push to Docker
50+ run : |
51+ docker build -t "tensorworks/sps-frontend:$VERSION" -f ./dockerfiles/sps-frontend.dockerfile .
52+ docker push "tensorworks/sps-frontend:$VERSION"
Original file line number Diff line number Diff line change 1+ FROM nginx:1.21.6
2+
3+ RUN mkdir www
4+ WORKDIR /www
5+
6+ ADD examples/typescript/dist/. /www/
7+
8+ RUN rm /etc/nginx/nginx.conf
9+ RUN ln -s /etc/nginx/sps/nginx.conf /etc/nginx/nginx.conf
10+
11+ EXPOSE 80
You can’t perform that action at this time.
0 commit comments