Skip to content

Commit

Permalink
i am bad at python
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jul 2, 2024
1 parent dbb15af commit 4e71570
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ concurrency:
jobs:
build:
name: Build documentation
runs-on: ubuntu-lates
stages:
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v4
with:
Expand All @@ -39,3 +39,42 @@ jobs:
with:
name: lenskit-docs
path: build/doc
publish:
name: Publish documentation
runs-on: ubuntu-latest
needs:
- build
environment: docs
steps:
- id: decrypt
name: 🔓 Decrypt deployment key
run: |
tmpdir=$(mktemp -d lksite.XXXXXX)
echo "$AGE_DECRYPT" >$tmpdir/decrypt-identity
echo 'deploy-key<<EOK' >>$GITHUB_OUTPUT
age -d -i $tmpdir/decrypt-identity etc/doc-deploy-key.asc >>$GITHUB_OUTPUT
echo 'EOK' >>$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.output.decrypt-identity}}
path: doc-site
ref: latest
- name: 📥 Fetch documentation package
uses: actions/download-artifact@v4
with:
name: lenskit-docs
path: build/doc
- name: 🛻 Copy documentation content
run: |
rsync -av --delete --exclude=.git/ build/doc/ doc-site/
cd doc-site
git config user.name "LensKit Doc Bot"
git config user.email "docbot@lenskit.org"
git add .
git commit -m 'rebuild documentation'
git push
2 changes: 1 addition & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- just
- pytorch-cpu
- nomkl
- pandas <3,>=1.5
- pandas >=1.5,<3
- numpy >=1.23,<2
- scipy >=1.9.0
- pytorch >=2.1,<3
Expand Down
9 changes: 6 additions & 3 deletions lkdev/workflows/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ def workflow():
"group": "test-${{github.ref}}",
"cancel-in-progress": True,
},
"jobs": {"build": job_build_docs()},
"jobs": {
"build": job_build_docs(),
"publish": job_publish_docs(),
},
}


def job_build_docs():
return {
"name": "Build documentation",
"runs-on": "ubuntu-lates",
"stages": stages_setup() + stages_build_doc() + stages_package(),
"runs-on": "ubuntu-latest",
"steps": stages_setup() + stages_build_doc() + stages_package(),
}


Expand Down

0 comments on commit 4e71570

Please sign in to comment.