Skip to content

Commit

Permalink
Resolve deploy key from secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke authored and mebeim committed Jun 26, 2020
1 parent 5e958f6 commit 7e3ca9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ jobs:
run: bash scripts/build.sh

- name: Deploy
run: bash scripts/deploy.sh
if: github.repository == 'tldr-pages/tldr' && github.branch == 'master'
run: bash scripts/deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function initialize {

# Decrypt and add deploy key.
eval "$(ssh-agent -s)"
openssl aes-256-cbc -K "$encrypted_973441be79af_key" -iv "$encrypted_973441be79af_iv" -in ./scripts/id_ed25519_tldr_asset_upload.enc -out id_ed25519 -d
echo "${DEPLOY_KEY}"> id_ed25519
chmod 600 id_ed25519
ssh-add id_ed25519
}
Expand Down

0 comments on commit 7e3ca9c

Please sign in to comment.