Deploy hub #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy hub | |
on: | |
workflow_run: | |
workflows: ['Build and push container image'] | |
types: [completed] | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
HUB: logodev | |
steps: | |
# For biggish images, github actions runs out of disk space. | |
# So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use | |
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150 | |
# and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104 | |
# This gives us a total of about 52G of free space, which should be enough for now | |
- name: cleanup disk space | |
run: | | |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc | |
df -h | |
- name: install tree | |
run: sudo apt-get install tree | |
- name: Checkout files in repo | |
uses: actions/checkout@v4 | |
with: | |
repository: 'berkeley-dsep-infra/datahub' | |
sparse-checkout: | | |
hub/ | |
'deployments/$HUB' | |
- name: install python + requirements | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' # caching pip dependencies | |
- run: pip install -r requirements.txt | |
- name: see if the correct dir has been checked out, and the requirements have been installed | |
run: | | |
ls -la | |
tree | |
pip freeze | |
# Lets us monitor disks getting full as images get bigger over time | |
- name: Show how much disk space is left | |
run: df -h |