Skip to content

Commit

Permalink
Remove deploy key
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jul 15, 2024
1 parent acc7b63 commit b535fe8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/docs.yml → .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,13 @@ jobs:
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
run: mkdocs build --strict -f mkdocs.public.yml

- name: "Add SSH key"
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.ASTRAL_DOCS_SSH_KEY }}

- name: "Clone repo"
run: |
version="${{ env.version }}"
git clone https://github.com/astral-sh/docs.git astral-docs
git clone https://${{ secrets.ASTRAL_DOCS_PAT }}@github.com/astral-sh/docs.git astral-docs
- name: "Copy docs"
run: rm -rf astral-docs/uv && cp -r site/uv astral-docs/uv
run: rm -rf astral-docs/site/uv && mkdir -p astral-docs/site && cp -r site/uv astral-docs/site/uv

- name: "Commit docs"
working-directory: astral-docs
Expand All @@ -119,18 +114,18 @@ jobs:
# set the PR title
pull_request_title="Update documentation for $display_name"
# authenticate with GitHub
echo ${{ secrets.ASTRAL_DOCS_PAT}} | gh auth login --with-token
# Delete any existing pull requests that are open for this version
# by checking against pull_reqeust_title because the new PR will
# by checking against pull_request_title because the new PR will
# supersede the old one.
gh pr list --state open --json title --jq '.[] | select(.title == "$pull_request_title") | .number' | \
xargs -I {} gh pr close {}
# push the branch to GitHub
git push origin $branch_name
# authenticate with GitHub
echo ${{ secrets.ASTRAL_DOCS_PAT}} | gh auth login --with-token
# create the PR
gh pr create --base main --head $branch_name \
--title "$pull_request_title" \
Expand Down

0 comments on commit b535fe8

Please sign in to comment.