Skip to content

Commit

Permalink
directly use key
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jul 2, 2024
1 parent d6c947c commit 2cba9e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 44 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📦 Install decryptor
run: sudo apt install -y age
- id: decrypt
name: 🔓 Decrypt deployment key
run: |
if [ -z "$AGE_DECRYPT" ]; then
echo ::error::Age decryption key not available
exit 1
fi
tmpdir=$(mktemp -d lksite.XXXXXX)
echo "$AGE_DECRYPT" >$tmpdir/decrypt-identity
echo 'deploy-key<<EOK' >$tmpdir/out
age -d -i $tmpdir/decrypt-identity etc/doc-deploy-key.asc >>$tmpdir/out
echo 'EOK' >>$tmpdir/out
cat $tmpdir/out >>$GITHUB_OUTPUT
rm -rf $tmpdir
env:
AGE_DECRYPT: ${{ secrets.DOC_DEPLOY_DECRYPT_KEY }}
- name: Check out doc site
uses: actions/checkout@v4
with:
repository: lenskit/lenskit-docs
ssh-key: ${{steps.decrypt.outputs.decrypt-identity}}
ssh-key: ${{ secrets.DOC_DEPLOY_KEY }}
path: doc-site
ref: latest
- name: 📥 Fetch documentation package
Expand Down
26 changes: 1 addition & 25 deletions lkdev/workflows/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,36 +91,12 @@ def job_publish_docs():
"environment": "docs",
"steps": [
step_checkout(),
{
"name": "📦 Install decryptor",
"run": "sudo apt install -y age",
},
{
"id": "decrypt",
"name": "🔓 Decrypt deployment key",
"run": script("""
if [ -z "$AGE_DECRYPT" ]; then
echo ::error::Age decryption key not available
exit 1
fi
tmpdir=$(mktemp -d lksite.XXXXXX)
echo "$AGE_DECRYPT" >$tmpdir/decrypt-identity
echo 'deploy-key<<EOK' >$tmpdir/out
age -d -i $tmpdir/decrypt-identity etc/doc-deploy-key.asc >>$tmpdir/out
echo 'EOK' >>$tmpdir/out
cat $tmpdir/out >>$GITHUB_OUTPUT
rm -rf $tmpdir
"""),
"env": {
"AGE_DECRYPT": "${{ secrets.DOC_DEPLOY_DECRYPT_KEY }}",
},
},
{
"name": "Check out doc site",
"uses": "actions/checkout@v4",
"with": {
"repository": "lenskit/lenskit-docs",
"ssh-key": "${{steps.decrypt.outputs.decrypt-identity}}",
"ssh-key": "${{ secrets.DOC_DEPLOY_KEY }}",
"path": "doc-site",
"ref": "latest",
},
Expand Down

0 comments on commit 2cba9e8

Please sign in to comment.