Skip to content

Commit dc07655

Browse files
committed
ci: publish to current repo
1 parent 7aadf7b commit dc07655

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ jobs:
4949
version: latest
5050
args: release --clean
5151
env:
52-
GITHUB_TOKEN: ${{ secrets.CTRESTCLIENT_PUBLISH }}
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5353

54-
deploy-versioned-docs:
54+
publish-versioned-docs:
5555
needs: release
5656
runs-on: ubuntu-latest
57+
permissions:
58+
contents: write
59+
pages: write
60+
id-token: write
5761
steps:
58-
- name: Checkout Source Repo
62+
- name: Checkout
5963
uses: actions/checkout@v4
6064
with:
6165
fetch-depth: 0
@@ -81,16 +85,14 @@ jobs:
8185
8286
- name: Configure Git for mike
8387
run: |
84-
git config --global user.name "${{ github.repository_owner }}"
85-
git config --global user.email "${{ github.repository_owner }}@users.noreply.github.com"
88+
git config user.name "${{ github.repository_owner }}"
89+
git config user.email "${{ github.repository_owner }}@users.noreply.github.com"
8690
8791
- name: Deploy versioned docs
8892
run: |
89-
git remote add target https://x-access-token:${{ secrets.CTRESTCLIENT_PUBLISH }}@github.com/mvach/ctRestClient.git
90-
git fetch target
91-
# Deploy the new version
92-
mike deploy --push --remote target --branch main ${{ steps.version.outputs.VERSION }} --title "${{ steps.version.outputs.VERSION }}" --update-aliases
93+
# Deploy the new version to gh-pages branch
94+
mike deploy --push ${{ steps.version.outputs.VERSION }} --title "${{ steps.version.outputs.VERSION }}" --update-aliases
9395
# Set this release as the new default (latest stable)
94-
mike set-default --push --remote target --branch main ${{ steps.version.outputs.VERSION }}
96+
mike set-default --push ${{ steps.version.outputs.VERSION }}
9597
env:
96-
GITHUB_TOKEN: ${{ secrets.CTRESTCLIENT_PUBLISH }}
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)