diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 843912f..0000000 Binary files a/.DS_Store and /dev/null differ 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/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 81% rename from .github/workflows/test.yml rename to .github/workflows/pr.yml index ccbf9bd..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: @@ -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