diff --git a/.github/workflows/develop-publish-gh-pages.yml b/.github/workflows/develop-publish-gh-pages.yml new file mode 100644 index 0000000..ce811e0 --- /dev/null +++ b/.github/workflows/develop-publish-gh-pages.yml @@ -0,0 +1,27 @@ +name: Deploy Action WebRTC JS SDK + +on: + push: + branches: + - develop +jobs: + publish-ubuntu-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@master + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + - name: Install dependencies + run: npm install + - name: Run release + run: npm run release + - name: Deploy to Github pages + uses: JamesIves/github-pages-deploy-action@v4.2.5 + with: + folder: dist + branch: gh-pages + target-folder: develop + clean: true diff --git a/.github/workflows/master-publish-gh-pages-and-npm.yml b/.github/workflows/master-publish-gh-pages-and-npm.yml new file mode 100644 index 0000000..5b3bdc6 --- /dev/null +++ b/.github/workflows/master-publish-gh-pages-and-npm.yml @@ -0,0 +1,31 @@ +name: Deploy and Publish Action WebRTC JS SDK + +on: + push: + branches: + - master +jobs: + publish-ubuntu-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@master + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + - name: Install dependencies + run: npm install + - name: Run release + run: npm run release + - name: Deploy to Github pages + uses: JamesIves/github-pages-deploy-action@v4.2.5 + with: + folder: dist + branch: gh-pages + clean: true + clean-exclude: develop/ + - name: Deploy to npm packages + uses: JS-DevTools/npm-publish@v1 + with: + token: '${{ secrets.NPM_TOKEN }}' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 0440c3f..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish Action WebRTC JS SDK - -on: - push: - branches: - - master - -jobs: - publish-ubuntu-build: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@master - - name: Use Node.js - uses: actions/setup-node@v2 - with: - node-version: 16 - - name: Install dependencies - run: npm install - - name: Run release - run: npm run release - - name: Deploy to Github pages - uses: JamesIves/github-pages-deploy-action@v4.2.5 - with: - folder: dist - branch: gh-pages - - name: Deploy to npm packages - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - \ No newline at end of file