Skip to content

Commit 30588b2

Browse files
authored
Revert "ci: add publish documentation workflow update release workflow"
This reverts commit 8786382.
1 parent 1bbe0ef commit 30588b2

File tree

3 files changed

+25
-50
lines changed

3 files changed

+25
-50
lines changed

.github/workflows/publish-documentation.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
permissions:
3434
contents: write
3535
id-token: write # This permission is required for trusted publishing
36+
env:
37+
PR_BRANCH_NAME: adjustments-release-${{ github.event.inputs.release-version }}
3638
steps:
3739
- name: Checkout the repository
3840
uses: actions/checkout@v4
@@ -50,16 +52,35 @@ jobs:
5052
run: poetry install --with docs
5153
- name: Create new documentation
5254
run: |
53-
gh workflow run publish-documentation.yaml \
54-
--repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-sdk \
55-
--ref ${{ github.ref }} \
56-
--field codeflare_sdk_release_version=${{ github.event.inputs.release-version }}
55+
sphinx-apidoc -o docs/sphinx src/codeflare_sdk "**/*test_*" --force
56+
make clean -C docs/sphinx
57+
make html -C docs/sphinx
5758
- name: Copy demo notebooks into SDK package
5859
run: cp -r demo-notebooks src/codeflare_sdk/demo-notebooks
5960
- name: Run poetry build
6061
run: poetry build
62+
- name: Commit changes in docs
63+
uses: stefanzweifel/git-auto-commit-action@v4
64+
with:
65+
file_pattern: 'docs'
66+
commit_message: "Changes in docs for release: v${{ github.event.inputs.release-version }}"
67+
create_branch: true
68+
branch: ${{ env.PR_BRANCH_NAME }}
69+
- name: Create a PR with code changes
70+
run: |
71+
if git branch -a | grep "${{ env.PR_BRANCH_NAME }}"; then
72+
GIT_BRANCH=${GITHUB_REF#refs/heads/}
73+
gh pr create --base "$GIT_BRANCH" --fill --head "${{ env.PR_BRANCH_NAME }}" --label "lgtm" --label "approved"
74+
fi
6175
env:
6276
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
77+
- name: Wait until PR with code changes is merged
78+
run: |
79+
if git branch -a | grep "${{ env.PR_BRANCH_NAME }}"; then
80+
timeout 3600 bash -c 'until [[ $(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state) == "MERGED" ]]; do sleep 5 && echo "$(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state)"; done'
81+
fi
82+
env:
83+
GITHUB_TOKEN: ${{ github.TOKEN }}
6384
- name: Create Github release
6485
uses: ncipollo/release-action@v1
6586
with:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ node_modules
1313
ui-tests/playwright-report
1414
ui-tests/test-results
1515
/src/codeflare_sdk.egg-info/
16-
docs/sphinx/_build

0 commit comments

Comments
 (0)