Skip to content

Commit

Permalink
Fix ssh issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
M1hono committed Oct 25, 2024
1 parent eccb186 commit 77e0e02
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@ jobs:
fetch-depth: 0

- name: Pull types from type repo
env:
TYPE_REPO_SSH_KEY: ${{ secrets.TYPE_REPO_SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$TYPE_REPO_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
if ! grep -q github.com ~/.ssh/known_hosts; then
ssh-keyscan github.com >> ~/.ssh/known_hosts
fi
git clone --depth 1 [email protected]:M1hono/CrychicDocTypes.git type_repo
GIT_SSH_COMMAND='ssh -i /home/mihono/.ssh/id_rsa' git clone --depth 1 [email protected]:M1hono/CrychicDocTypes.git type_repo
cp -r type_repo/typefiles .
rm -rf type_repo
echo "Types pulled successfully"
Expand Down Expand Up @@ -61,16 +56,11 @@ jobs:
git config user.email "<>"
- name: Clone private repo
env:
PRIVATE_REPO_SSH_KEY: ${{ secrets.PRIVATE_REPO_SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$PRIVATE_REPO_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
if ! grep -q github.com ~/.ssh/known_hosts; then
ssh-keyscan github.com >> ~/.ssh/known_hosts
fi
git clone --depth 1 [email protected]:M1hono/CrychicDocSynchronization.git temp_repo
GIT_SSH_COMMAND='ssh -i /home/mihono/.ssh/id_rsa' git clone --depth 1 [email protected]:M1hono/CrychicDocSynchronization.git temp_repo
- name: Copy necessary files
run: |
Expand All @@ -82,14 +72,12 @@ jobs:
fi
- name: Push to private repo
env:
PRIVATE_REPO_SSH_KEY: ${{ secrets.PRIVATE_REPO_SSH_KEY }}
run: |
cd .vitepress/dist
git init
git add -A
git commit -m "Update documentation"
git push --force [email protected]:M1hono/CrychicDocSynchronization.git HEAD:main
GIT_SSH_COMMAND='ssh -i /home/mihono/.ssh/id_rsa' git push --force [email protected]:M1hono/CrychicDocSynchronization.git HEAD:main
cleanup:
needs: push-to-private-repo
Expand Down

0 comments on commit 77e0e02

Please sign in to comment.