1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/.github/workflows/main.yml
Steve Richards c9c55842da Remove docs from lens repo
- Remove all docs apart from extension api auto-generated related docs. All standard Lens IDE docs will now reside in lens-ide repo;
- Remove the delete and set-version workflows for the docs. These will now reside in the lens-ide repo;
- Amend the existing workflow that builds/publishes the docs to instead create a repository dispatch event to the lens-ide repo. This event will be the trigger for the build/publish docs workflow in lens-ide repo

Signed-off-by: Steve Richards <srichards@mirantis.com>
2021-05-24 11:27:52 +01:00

33 lines
1.2 KiB
YAML

name: Create Repository Dispatch request to lens-ide to publish docs
on:
push:
branches:
- master
release:
types:
- published
jobs:
issue-publish-docs:
name: Issue Repository Dispatch to publish docs
runs-on: ubuntu-latest
steps:
- name: Get the branch
if: contains(github.ref, 'refs/heads/master')
id: get_branch
run: echo ::set-output name=BRANCH::master}
- name: Get the release version
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Dispatch initiating repository event
run: |
echo "Branch: ${{ github.event.inputs.branch }}"
echo "Tag: ${{ github.event.inputs.tag }}"
curl -X POST https://api.github.com/repos/lensapp/lens-ide/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.GH_TOKEN }} \
--data '{"event_type": "publish-docs", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'", "branch": "'"${{ steps.get_branch.outputs.BRANCH }}"'", "tag": "'"${{ steps.get_version.outputs.VERSION }}"'" }}'