Skip to content

Commit a12c500

Browse files
PascalThuetclaude
andcommitted
merge: resolve conflict with development branch
Merge origin/development into optim/replace-ua-parser-js. Resolved package-lock.json conflict by regenerating from development's package.json with npm install. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 parents f400446 + 98d2e9f commit a12c500

121 files changed

Lines changed: 14745 additions & 2830 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Setup dash.js'
2+
description: 'Setup Node.js, cache and install dependencies'
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version: '20'
11+
cache: 'npm'
12+
- name: Cache node modules
13+
id: cache-npm
14+
uses: actions/cache@v4
15+
with:
16+
path: node_modules
17+
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
18+
restore-keys: |
19+
${{ runner.os }}-build-
20+
${{ runner.os }}-
21+
- name: Install dependencies
22+
if: steps.cache-npm.outputs.cache-hit != 'true'
23+
shell: bash
24+
run: npm install

.github/workflows/deploy.yml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
deploy_path:
1010
required: true
1111
type: string
12+
deploy_type:
13+
required: true
14+
type: string
15+
description: 'Type of deployment: "samples" (reference player + samples) or "build" (dist artifacts + JSDoc)'
1216
secrets:
1317
host:
1418
required: true
@@ -23,23 +27,21 @@ jobs:
2327

2428
steps:
2529
- uses: actions/checkout@v4
26-
- name: Use Node.js
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version: "20.x"
30-
- name: Install dependencies
31-
run: npm install
30+
- name: Setup dash.js
31+
uses: ./.github/actions/setup-dashjs
3232
- name: Run build
3333
run: npm run build
3434
- name: Find and Replace
35+
if: inputs.deploy_type == 'samples'
3536
uses: jacobtomlinson/gha-find-replace@v2
3637
env:
3738
replacement_string: ${{ format('{0} - commit <a href="https://github.com/Dash-Industry-Forum/dash.js/commit/{1}">{2}</a>', github.ref_name, github.sha, github.sha)}}
3839
with:
3940
find: "<!-- commit-info -->"
4041
replace: ${{env.replacement_string}}
41-
include: "samples/dash-if-reference-player/index.html"
42+
include: "samples/dash-if-reference-player*/index.html"
4243
- name: Build all samples
44+
if: inputs.deploy_type == 'samples'
4345
run: |
4446
for sample in "network-interceptor"; do
4547
echo "Building sample: $sample"
@@ -48,16 +50,37 @@ jobs:
4850
npm run build
4951
rm -rf node_modules
5052
done
51-
- name: Copy to deploy directory for deployment
53+
- name: Build JSDoc
54+
if: inputs.deploy_type == 'build'
55+
run: npm run doc
56+
continue-on-error: true
57+
- name: Copy samples to deploy directory
58+
if: inputs.deploy_type == 'samples'
59+
env:
60+
ENVNAME: ${{ inputs.envname }}
5261
run: |
53-
mkdir -p ${{inputs.envname}}
54-
cp -R contrib dist samples ${{inputs.envname}}
62+
mkdir -p "$ENVNAME"
63+
cp -R contrib dist samples "$ENVNAME"
64+
- name: Copy build artifacts to deploy directory
65+
if: inputs.deploy_type == 'build'
66+
env:
67+
ENVNAME: ${{ inputs.envname }}
68+
run: |
69+
mkdir -p "$ENVNAME"
70+
cp -R docs/jsdoc "$ENVNAME/jsdoc" && cp -R dist/modern/umd/* "$ENVNAME" && cp -R dist/* index.d.ts "$ENVNAME"
5571
- name: Install SSH Key
5672
uses: shimataro/ssh-key-action@v2
5773
with:
5874
key: ${{ secrets.private_key }}
5975
known_hosts: unnecessary
76+
- name: Fetch host keys
77+
run: ssh-keyscan -H ${{ secrets.host }} >> ~/.ssh/known_hosts
6078
- name: Deploy with scp
79+
env:
80+
DEPLOY_USER: ${{ secrets.user }}
81+
DEPLOY_HOST: ${{ secrets.host }}
82+
DEPLOY_PATH: ${{ inputs.deploy_path }}
83+
ENVNAME: ${{ inputs.envname }}
6184
run: |
62-
ssh -o StrictHostKeyChecking=no -oHostKeyAlgorithms=+ssh-dss ${{ secrets.USER }}@${{ secrets.HOST }} "mkdir -p ${{ inputs.deploy_path }}/${{inputs.envname}}"
63-
scp -r -o StrictHostKeyChecking=no -oHostKeyAlgorithms=+ssh-dss ${{inputs.envname}} ${{ secrets.user }}@${{ secrets.host }}:${{ inputs.deploy_path }}
85+
ssh "$DEPLOY_USER@$DEPLOY_HOST" "mkdir -p \"$DEPLOY_PATH/$ENVNAME\""
86+
scp -r "$ENVNAME" "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH"

.github/workflows/deploy_build.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/deploy_build_latest.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy_latest
1+
name: deploy_build_latest
22

33
on:
44
push:
@@ -8,10 +8,11 @@ on:
88
jobs:
99
deploy_latest:
1010
if: github.repository == 'Dash-Industry-Forum/dash.js'
11-
uses: ./.github/workflows/deploy_build.yml
11+
uses: ./.github/workflows/deploy.yml
1212
with:
1313
envname: latest
1414
deploy_path: '/377335'
15+
deploy_type: build
1516
secrets:
1617
host: ${{secrets.HOST}}
1718
user: ${{secrets.USER}}
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: deploy_build_latest_as_version_folder
1+
name: deploy_latest_as_version_folder
22

33
on:
44
push:
@@ -14,25 +14,33 @@ jobs:
1414
steps:
1515
- name: Check out repository
1616
uses: actions/checkout@v4
17-
1817
- name: Read version from package.json
1918
id: set_version
20-
run: |
21-
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
19+
run: echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
2220
shell: bash
2321

24-
- name: Print version
25-
run: |
26-
echo "Version: ${{ steps.set_version.outputs.version }}"
22+
deploy_samples:
23+
if: github.repository == 'Dash-Industry-Forum/dash.js'
24+
needs: get_version_number
25+
uses: ./.github/workflows/deploy.yml
26+
with:
27+
envname: v${{ needs.get_version_number.outputs.version }}
28+
deploy_path: '/377335/dash.js'
29+
deploy_type: samples
30+
secrets:
31+
host: ${{ secrets.HOST }}
32+
user: ${{ secrets.USER }}
33+
private_key: ${{ secrets.PRIVATE_KEY }}
2734

28-
deploy:
35+
deploy_build:
2936
if: github.repository == 'Dash-Industry-Forum/dash.js'
3037
needs: get_version_number
31-
uses: ./.github/workflows/deploy_build.yml
38+
uses: ./.github/workflows/deploy.yml
3239
with:
3340
envname: v${{ needs.get_version_number.outputs.version }}
3441
deploy_path: '/377335'
42+
deploy_type: build
3543
secrets:
3644
host: ${{ secrets.HOST }}
3745
user: ${{ secrets.USER }}
38-
private_key: ${{ secrets.PRIVATE_KEY }}
46+
private_key: ${{ secrets.PRIVATE_KEY }}

.github/workflows/deploy_latest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
with:
1313
envname: latest
1414
deploy_path: '/377335/dash.js'
15+
deploy_type: samples
1516
secrets:
1617
host: ${{secrets.HOST}}
1718
user: ${{secrets.USER}}

.github/workflows/deploy_latest_as_version_folder.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/deploy_nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
with:
1313
envname: nightly
1414
deploy_path: '/377335/dash.js'
15+
deploy_type: samples
1516
secrets:
1617
host: ${{secrets.HOST}}
1718
user: ${{secrets.USER}}

.github/workflows/deploy_v4_latest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
with:
1313
envname: v4_latest
1414
deploy_path: '/377335/dash.js'
15+
deploy_type: samples
1516
secrets:
1617
host: ${{secrets.HOST}}
1718
user: ${{secrets.USER}}

.github/workflows/deploy_v4_nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
with:
1313
envname: v4_nightly
1414
deploy_path: '/377335/dash.js'
15+
deploy_type: samples
1516
secrets:
1617
host: ${{secrets.HOST}}
1718
user: ${{secrets.USER}}

0 commit comments

Comments
 (0)