forked from Dash-Industry-Forum/dash.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_build_latest_as_version_folder.yml
More file actions
46 lines (42 loc) · 1.48 KB
/
deploy_build_latest_as_version_folder.yml
File metadata and controls
46 lines (42 loc) · 1.48 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
name: deploy_latest_as_version_folder
on:
push:
branches:
- 'master'
jobs:
get_version_number:
if: github.repository == 'Dash-Industry-Forum/dash.js'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set_version.outputs.version }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Read version from package.json
id: set_version
run: echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
shell: bash
deploy_samples:
if: github.repository == 'Dash-Industry-Forum/dash.js'
needs: get_version_number
uses: ./.github/workflows/deploy.yml
with:
envname: v${{ needs.get_version_number.outputs.version }}
deploy_path: '/377335/dash.js'
deploy_type: samples
secrets:
host: ${{ secrets.HOST }}
user: ${{ secrets.USER }}
private_key: ${{ secrets.PRIVATE_KEY }}
deploy_build:
if: github.repository == 'Dash-Industry-Forum/dash.js'
needs: get_version_number
uses: ./.github/workflows/deploy.yml
with:
envname: v${{ needs.get_version_number.outputs.version }}
deploy_path: '/377335'
deploy_type: build
secrets:
host: ${{ secrets.HOST }}
user: ${{ secrets.USER }}
private_key: ${{ secrets.PRIVATE_KEY }}