alternative aws download #10
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
on: | |
pull_request: | |
push: | |
branches: main | |
name: Publish | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up specific version of Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
# - name: Install AWS CLI | |
# uses: unfor19/install-aws-cli-action@v1 | |
- name: Cache usecase_data | |
uses: actions/cache@v2 | |
with: | |
path: | | |
notebooks/usecase_data | |
key: usecase_data_${{ runner.os }} | |
- name: Make sure data is available | |
run: | | |
if [[ ! -f notebooks/usecase_data/sc_counts_reannotated_with_counts.h5ad ]]; then | |
wget https://openproblems-bio.s3.amazonaws.com/public/neurips-2023-competition/sc_counts_reannotated_with_counts.h5ad \ | |
-O notebooks/usecase_data/sc_counts_reannotated_with_counts.h5ad | |
fi | |
# aws s3 cp \ | |
# --no-sign-request \ | |
# s3://openproblems-bio/public/neurips-2023-competition/sc_counts_reannotated_with_counts.h5ad \ | |
# notebooks/usecase_data/sc_counts_reannotated_with_counts.h5ad | |
# attempt with pixi: | |
# - name: Install pixi | |
# run: curl -fsSL https://pixi.sh/install.sh | bash | |
# - name: Cache several folders | |
# uses: actions/cache@v2 | |
# with: | |
# path: | | |
# _freeze | |
# .pixi | |
# key: pixi_${{ runner.os }} | |
# - name: Set up dependencies | |
# run: pixi install -e dev | |
# - name: Render slides | |
# run: pixi run render_slides | |
# attempt with renv | |
- name: Set up renv | |
uses: r-lib/actions/setup-renv@v2 | |
- name: Cache _freeze | |
uses: actions/cache@v2 | |
with: | |
path: | | |
_freeze | |
key: renv_${{ runner.os }} | |
- name: Render slides | |
run: | | |
source renv/python/virtualenvs/renv-python-3.12/bin/activate | |
quarto render | |
- name: Deploy 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: _book | |
branch: gh-pages | |
force: false | |
clean-exclude: pr-preview/ | |
- name: Deploy preview | |
if: github.event_name == 'pull_request' | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
source-dir: _book | |
preview-branch: gh-pages | |
umbrella-dir: pr-preview | |
action: auto |