From 6771a18e23aaab1e7dba920c77e8752b13126567 Mon Sep 17 00:00:00 2001 From: Benjamin Clos Date: Thu, 30 Jan 2025 06:39:28 -0700 Subject: [PATCH 1/2] chore(ci): move all jobs to github actions; --- .DS_Store | Bin 6148 -> 0 bytes .circleci/config.yml | 26 -------------------------- .github/workflows/test.yml | 2 -- .gitignore | 2 ++ .tasks/upload-adhoc.bash | 10 ---------- 5 files changed, 2 insertions(+), 38 deletions(-) delete mode 100644 .DS_Store delete mode 100644 .circleci/config.yml delete mode 100755 .tasks/upload-adhoc.bash diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 843912ff854a7d94fb8e83c361410dc4927bca24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ5Iwu5S?{Wn4gp)LXl{!y4l}d&eS;>;oO|F~1v4XH~iA zthB(kD!|XKPX*mjNmcOthLfvyuB@^wpI13z@oRMW@^Sfo9_EW*^Nah|yD{{yNRQ_9 zKzYDQ2jAFLGi}cLcKLaF;yIh_im{sw_~;m$V%H~nq*=(f`?bon`7X}hmYLk6)|J(Y zubW-N$DC%SfGJ=KY@-6`*=+HippB-0DPRgT3h?(KfitFxwV?lWVDLu(U>{*`m=AaY zOcYbaS`ZnSlTx6RIz3`IDMvifb*W-4DCOkz@Zpr%=?TSocI=<{<>XR98%+UIAXK0y zmjmwqlg;P~R)!Nj*>tmRgG1owt` X!V_SsSPLQovmXI3gAJy@pDOSJVEtR5 diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 181e4ff..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,26 +0,0 @@ -version: 2.1 -orbs: - node: circleci/node@5.2.0 -jobs: - build-demo: - executor: node/default # use the default executor defined within the orb - steps: - - checkout - - node/install-packages: - pkg-manager: yarn - - run: - name: Build demo - command: yarn demo - - run: - name: install-awscli - command: sudo apt-get update && sudo apt-get install -y awscli - - run: - name: Upload adhoc site - command: .tasks/upload-adhoc.bash -workflows: - build-edge: - jobs: - - build-demo: - context: - - aws-eu-west-1-player - - aws-eu-west-1-player-s3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ccbf9bd..ffea3a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,8 +21,6 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Authenticate with private NPM package - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.PLAYBACK_NPM_PUBLISHING_TOKEN }}" > ~/.npmrc - name: yarn install run: yarn install --immutable - name: build diff --git a/.gitignore b/.gitignore index ba79d91..c3bd9d7 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,5 @@ dist # TernJS port file .tern-port lib + +.DS_Store \ No newline at end of file diff --git a/.tasks/upload-adhoc.bash b/.tasks/upload-adhoc.bash deleted file mode 100755 index 3097da0..0000000 --- a/.tasks/upload-adhoc.bash +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# exit if not on CIRCLE -[[ -z "$CIRCLECI" ]] && { echo "Not Circle CI, exiting" ; exit 1; } - -BUCKET_PREFIX="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/$CIRCLE_BRANCH" - -cp demo/index.html demo/dist/index.html - -aws s3 sync --acl public-read demo/dist "s3://builds.flowplayer.com/$BUCKET_PREFIX/" \ No newline at end of file From ab224b1ccdbe4c3cd980904d7b7d4edca7d3809c Mon Sep 17 00:00:00 2001 From: Benjamin Clos Date: Thu, 30 Jan 2025 07:15:30 -0700 Subject: [PATCH 2/2] chore: add gh pages deploy; --- .github/workflows/deploy.yml | 47 ++++++++++++++++++++++++++ .github/workflows/{test.yml => pr.yml} | 4 +-- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml rename .github/workflows/{test.yml => pr.yml} (96%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c8ed52d --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,47 @@ +name: deploy +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + - id: yarn-cache-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --immutable + - run: yarn demo + - id: deployment + uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action + with: + path: demo/dist/ + + # Deploy job + deploy: + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action + env: + name: preview + url: ${{ steps.deployment.outputs.page_url }} diff --git a/.github/workflows/test.yml b/.github/workflows/pr.yml similarity index 96% rename from .github/workflows/test.yml rename to .github/workflows/pr.yml index ffea3a6..839db11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/pr.yml @@ -1,9 +1,9 @@ -name: test +name: pr # Triggers the workflow on push or pull request events on: [pull_request] jobs: - danger-bot: + test-types: runs-on: ubuntu-latest name: run typespec steps: