Skip to content

Commit

Permalink
Update: deployment pipeline with reference in PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
davidberenstein1957 committed Jun 24, 2024
1 parent 9fb2637 commit 06b5ef5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/argilla.docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,31 @@ jobs:
run: echo "${{ github.ref }}"
echo "${{ github.head_ref }}"

- run: |
- name: Deploy Argilla docs (branch /main)
run: |
pdm run mike set-default --push latest
pdm run mike deploy latest --push
if: github.ref == 'refs/heads/main'

- run: pdm run mike deploy dev --push
- name: Deploy Argilla docs (branch /develop)
run: pdm run mike deploy dev --push
if: github.ref == 'refs/heads/develop'

- run: pdm run mike deploy ${{ github.ref_name }}
- name: Deploy Argilla docs (release vX.Y.Z)
run: pdm run mike deploy ${{ github.ref_name }}
if: startsWith(github.ref, 'refs/tags/')

- name: Extract branch name
id: extract_branch_name
shell: bash
run: echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's/\//_/g' >> $GITHUB_OUTPUT

- run: pdm run mike deploy ${{ steps.extract_branch_name.outputs.branch_name }} --prop-set hidden=true --push
- name: Deploy Argilla docs (branch /docs/*)
run: pdm run mike deploy ${{ steps.extract_branch_name.outputs.branch_name }} --prop-set hidden=true --push
if: startsWith(github.ref, 'refs/heads/docs') || startsWith(github.head_ref, 'docs/')

- uses: mshick/add-pr-comment@v2
if: startsWith(github.ref, 'refs/heads/docs') || startsWith(github.head_ref, 'docs/')
with:
message: |
Docs have been deployed her: [https://argilla-io.github.io/argilla/${{ steps.extract_branch_name.outputs.branch_name }}](https://argilla-io.github.io/argilla/${{ steps.extract_branch_name.outputs.branch_name }})

0 comments on commit 06b5ef5

Please sign in to comment.