Skip to content

Commit cbb12fd

Browse files
committed
Make the workflow more consistent with ruby/ruby
1 parent c51dd51 commit cbb12fd

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@ on:
66
jobs:
77
deploy:
88
runs-on: ubuntu-latest
9+
if: ${{ github.repository == 'ruby/git.ruby-lang.org' }}
910
steps:
10-
- uses: actions/checkout@v5
11-
- name: Set up SSH
12-
env:
13-
RUBY_GIT_SYNC_PRIVATE_KEY: ${{ secrets.RUBY_GIT_SYNC_PRIVATE_KEY }}
14-
run: |
15-
mkdir -p ~/.ssh
16-
echo "$RUBY_GIT_SYNC_PRIVATE_KEY" > ~/.ssh/id_ed25519
17-
chmod 600 ~/.ssh/id_ed25519
18-
ssh-keyscan -t ed25519 git.ruby-lang.org >> ~/.ssh/known_hosts
19-
20-
- name: Sync /home/git/git.ruby-lang.org
21-
run: ssh -i ~/.ssh/id_ed25519 [email protected] 'sudo -u git /home/git/git.ruby-lang.org/bin/update-git-ruby-lang-org.sh'
11+
- name: Sync git.ruby-lang.org
12+
run: |
13+
mkdir -p ~/.ssh
14+
echo "$RUBY_GIT_SYNC_PRIVATE_KEY" > ~/.ssh/id_ed25519
15+
chmod 600 ~/.ssh/id_ed25519
16+
ssh-keyscan -t ed25519 git.ruby-lang.org >> ~/.ssh/known_hosts
17+
ssh -i ~/.ssh/id_ed25519 [email protected] "sudo -u git /home/git/git.ruby-lang.org/bin/update-git-ruby-lang-org.sh"
18+
env:
19+
RUBY_GIT_SYNC_PRIVATE_KEY: ${{ secrets.RUBY_GIT_SYNC_PRIVATE_KEY }}

0 commit comments

Comments
 (0)