From 78fafe4629dcfbdc9662522e91ea4ba4319dc7a1 Mon Sep 17 00:00:00 2001 From: Olivier Lando Date: Mon, 13 Nov 2023 18:31:26 +0100 Subject: [PATCH] README to documentation synchro --- .github/workflows/create-documentation-pr.yml | 27 ++++++++++++++++++ README.md | 28 ++++++++++++++----- 2 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/create-documentation-pr.yml diff --git a/.github/workflows/create-documentation-pr.yml b/.github/workflows/create-documentation-pr.yml new file mode 100644 index 0000000..82386d5 --- /dev/null +++ b/.github/workflows/create-documentation-pr.yml @@ -0,0 +1,27 @@ +name: Create documentation PR +on: + # Trigger the workflow on pull requests targeting the main branch + pull_request: + types: [assigned, unassigned, opened, reopened, synchronize, edited, labeled, unlabeled, edited, closed] + branches: + - main + +jobs: + create_documentation_pr: + if: github.event.action != 'closed' + + runs-on: ubuntu-latest + + steps: + - name: Check out current repository code + uses: actions/checkout@v2 + + - name: Create the documentation pull request + uses: apivideo/api.video-create-readme-file-pull-request-action@main + with: + source-file-path: "README.md" + destination-repository: apivideo/api.video-api-client-generator + destination-path: templates/documentation/sdks/player + destination-filename: apivideo-videojs-analytics.md + pat: "${{ secrets.PAT }}" + \ No newline at end of file diff --git a/README.md b/README.md index 630d4b6..0a32ad5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + [![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video)   [![badge](https://img.shields.io/github/stars/apivideo/api.video-videojs-analytics?style=social)](https://github.com/apivideo/api.video-videojs-analytics)   [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video) ![](https://github.com/apivideo/.github/blob/main/assets/apivideo_banner.png) ![npm](https://img.shields.io/npm/v/@api.video/videojs-player-analytics) ![ts](https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label) @@ -6,7 +7,7 @@ [api.video](https://api.video) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app. -# Table of contents +## Table of contents - [Table of contents](#table-of-contents) - [Project description](#project-description) @@ -16,15 +17,28 @@ - [Method #2: typescript](#method-2-typescript) - [Method #3: simple include in a javascript project](#method-3-simple-include-in-a-javascript-project) -# Project description + + +## Project description video.js plugin to call the api.video analytics collector. -# Getting started +## Getting started -## Installation +### Installation -### Method #1: requirejs +#### Method #1: requirejs If you use requirejs you can add the plugin as a dependency to your project with @@ -43,7 +57,7 @@ const player = videojs('my-video'); player.apiVideoAnalytics(); ``` -### Method #2: typescript +#### Method #2: typescript If you use Typescript you can add the plugin as a dependency to your project with @@ -64,7 +78,7 @@ player.apiVideoAnalytics(); ``` -### Method #3: simple include in a javascript project +#### Method #3: simple include in a javascript project Include the plugin in your HTML file like so: