fix: implement pings for websocket on browser (#103) #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push to main branch | |
on: | |
push: | |
branches: | |
- master | |
- 1-stable | |
jobs: | |
doc-snippets: | |
name: Doc Snippets | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- uses: actions/[email protected] | |
with: | |
node-version: "12" | |
- uses: ./.github/actions/doc-snippets | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/setup-dart@v1 | |
- uses: ./.github/actions/unit-tests | |
dart-doc: | |
name: Generate DartDoc | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/setup-dart@v1 | |
- uses: ./.github/actions/dart-doc | |
doc-deploy: | |
name: Deploy Doc to Prod | |
runs-on: ubuntu-latest | |
needs: [doc-snippets, unit-tests] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Extract references from context | |
shell: bash | |
id: extract-refs | |
run: | | |
echo "::set-output name=version::$(git describe --abbrev=0 --tags | cut -d. -f 1)" | |
echo "::set-output name=repo::$(echo $GITHUB_REPOSITORY | cut -d/ -f 2)" | |
echo "::set-output name=branch::$(echo $GITHUB_REF | cut -d/ -f 3)" | |
- uses: convictional/[email protected] | |
with: | |
owner: kuzzleio | |
repo: documentation | |
github_token: ${{ secrets.ACCESS_TOKEN_CI }} | |
workflow_file_name: child_repo.workflow.yml | |
ref: master | |
inputs: '{"repo_name": "${{ steps.extract-refs.outputs.repo }}", "branch": "${{ steps.extract-refs.outputs.branch }}", "version": "${{ steps.extract-refs.outputs.version }}"}' | |
deploy-package: | |
name: Publish Package | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
needs: [unit-tests, doc-snippets] | |
if: ${{ !startsWith( github.event.head_commit.message, '[no-deploy]') }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: ">> Dart package <<" | |
uses: k-paxian/dart-package-publisher@master | |
with: | |
accessToken: ${{ secrets.PUB_ACCESS_TOKEN }} | |
refreshToken: ${{ secrets.PUB_REFRESH_TOKEN }} | |
skipTests: true | |
suppressBuildRunner: true | |
force: true |