Add Javascript update Github Actions workflow (#275)
* JS update workflow * Update package.json to see if workflow fires properly * Commit updated Javascript packages Co-authored-by: Owncast <owncast@owncast.online>
This commit is contained in:
28
.github/workflows/javascript-packages.yaml
vendored
Normal file
28
.github/workflows/javascript-packages.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: javascript-packages
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- build/javascript/package.json
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
name: npm run build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
cd build/javascript
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Commit changes
|
||||||
|
uses: EndBug/add-and-commit@v5
|
||||||
|
with:
|
||||||
|
author_name: Owncast
|
||||||
|
author_email: owncast@owncast.online
|
||||||
|
message: "Commit updated Javascript packages"
|
||||||
|
add: "build/javascript/package* webroot/js/web_modules"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -34,6 +34,6 @@
|
|||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"build": "npm install && npx snowpack install && cp node_modules/video.js/dist/video-js.min.css web_modules/videojs && cp -R web_modules ../../webroot/js"
|
"build": "npm install && npx snowpack install && cp node_modules/video.js/dist/video-js.min.css web_modules/videojs && cp -R web_modules ../../webroot/js"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "Owncast",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ class LiteYTEmbed extends HTMLElement {
|
|||||||
if (this.domRefFrame.classList.contains('lyt-activated')) {
|
if (this.domRefFrame.classList.contains('lyt-activated')) {
|
||||||
this.domRefFrame.classList.remove('lyt-activated');
|
this.domRefFrame.classList.remove('lyt-activated');
|
||||||
this.shadowRoot.querySelector('iframe').remove();
|
this.shadowRoot.querySelector('iframe').remove();
|
||||||
|
this.iframeLoaded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user