From 72de85bc109372a8fc1fd9cac625662fc3e3340e Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 20 Oct 2020 18:38:37 -0700 Subject: [PATCH] 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 --- .github/workflows/javascript-packages.yaml | 28 +++++++++++++++++++ build/javascript/package.json | 2 +- .../@justinribeiro/lite-youtube.js | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/javascript-packages.yaml diff --git a/.github/workflows/javascript-packages.yaml b/.github/workflows/javascript-packages.yaml new file mode 100644 index 000000000..6f1f6316c --- /dev/null +++ b/.github/workflows/javascript-packages.yaml @@ -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 }} diff --git a/build/javascript/package.json b/build/javascript/package.json index 3fa35ab3e..831a19d59 100644 --- a/build/javascript/package.json +++ b/build/javascript/package.json @@ -34,6 +34,6 @@ "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" }, - "author": "", + "author": "Owncast", "license": "ISC" } diff --git a/webroot/js/web_modules/@justinribeiro/lite-youtube.js b/webroot/js/web_modules/@justinribeiro/lite-youtube.js index f6a750abf..281152c04 100644 --- a/webroot/js/web_modules/@justinribeiro/lite-youtube.js +++ b/webroot/js/web_modules/@justinribeiro/lite-youtube.js @@ -193,6 +193,7 @@ class LiteYTEmbed extends HTMLElement { if (this.domRefFrame.classList.contains('lyt-activated')) { this.domRefFrame.classList.remove('lyt-activated'); this.shadowRoot.querySelector('iframe').remove(); + this.iframeLoaded = false; } } break;