use composite action #1
Workflow file for this run
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: Release Candidate | |
on: | |
push: | |
branches: | |
- 'RC-[0-9]+.[0-9]+.[0-9]+' | |
pull_request: | |
types: [closed] | |
jobs: | |
deploy-docs: | |
name: Deploy generated jsdoc | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Install | |
uses: ./.github/actions/setup-install | |
- name: build docs | |
run: npm run build-doc | |
- name: deploy docs | |
run: netlify-cli deploy --prod --site ${{ secrets.NETLIFY_DOC_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --dir ./packages/millicast-sdk/docs | |
# TODO: deploy example apps | |
cleanup: | |
name: Delete RC branch when PR is closed | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'refs/heads/RC-') }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Delete branch | |
run: git push --delete origin ${{ github.head_ref }} |