-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/deployment adjustments (#4041)
Workflow to deploy nightly to Akamai CDN
- Loading branch information
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: deploy | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
envname: | ||
required: true | ||
type: string | ||
deploy_path: | ||
required: true | ||
type: string | ||
secrets: | ||
host: | ||
required: true | ||
user: | ||
required: true | ||
private_key: | ||
required: true | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14.x" | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run build | ||
run: npm run build | ||
- name: Find and Replace | ||
uses: jacobtomlinson/gha-find-replace@v2 | ||
env: | ||
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)}} | ||
with: | ||
find: "<!-- commit-info -->" | ||
replace: ${{env.replacement_string}} | ||
include: "samples/dash-if-reference-player/index.html" | ||
- name: Copy to deploy directory for deployment | ||
run: | | ||
mkdir ${{inputs.envname}} | ||
cp -R contrib dist samples test/functional/config test/functional/tests ${{inputs.envname}} | ||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.private_key }} | ||
known_hosts: unnecessary | ||
|
||
- name: Deploy with rsync | ||
run: rsync -av -e "ssh -o StrictHostKeyChecking=no -oHostKeyAlgorithms=+ssh-dss" ${{inputs.envname}} ${{ secrets.user }}@${{ secrets.host }}:${{ inputs.deploy_path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
deploy_staging: | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
envname: latest | ||
deploy_path: '/377335/dash.js' | ||
secrets: | ||
host: ${{secrets.HOST}} | ||
user: ${{secrets.USER}} | ||
private_key: ${{secrets.PRIVATE_KEY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'development' | ||
|
||
jobs: | ||
deploy_staging: | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
envname: nightly | ||
deploy_path: '/377335/dash.js' | ||
secrets: | ||
host: ${{secrets.HOST}} | ||
user: ${{secrets.USER}} | ||
private_key: ${{secrets.PRIVATE_KEY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters