Skip to content

.github/workflows/generate_data.yaml #1343

.github/workflows/generate_data.yaml

.github/workflows/generate_data.yaml #1343

on:
schedule:
- cron: "0 0 * * *" # daily
push:
branches:
- master # Set a branch to deploy
- develop # Note has logic around deployment
- fix-pipeline
name: build
jobs:
production:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GH_OPENPHARMA }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9 # Specify the right version of python
uses: actions/setup-python@v3
with:
python-version: "3.9"
- name: Snakemake # python3 -m pip install --upgrade networkx pygraphvis
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pulp==2.7.0
python3 -m pip install snakemake==7.32.4
python3 -m pip install numpy==1.26.4
python3 -m pip install pandas==1.4.2
python3 -m pip install boto3==1.24.9
python3 -m pip install requests==2.28
python3 -m pip install PyYAML
python3 -m pip install scikit-learn==1.1.1
python3 -m pip install pyarrow
- name: Install system libs
run: |
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libharfbuzz-dev libfribidi-dev
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.1.0'
- uses: r-lib/actions/setup-renv@v2
- uses: r-lib/actions/setup-pandoc@v2
# IF develop
- name: Build dev
if: ${{ github.ref == 'refs/heads/develop' }}
env:
OPENPHARMA_AWS_ACCESS_KEY_ID: ${{ secrets.OPENPHARMA_AWS_ACCESS_KEY_ID }}
OPENPHARMA_AWS_SECRET_ACCESS_KEY: ${{ secrets.OPENPHARMA_AWS_SECRET_ACCESS_KEY }}
OPENPHARMA_AWS_DEFAULT_REGION: ${{ secrets.OPENPHARMA_AWS_DEFAULT_REGION }}
OPENPHARMA_PAT: ${{ secrets.OPENPHARMA_PAT }}
run: |
snakemake -j2 -F python_icon_readme
# IF main
- name: Build prod
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/fix-pipeline' }}
env:
OPENPHARMA_AWS_ACCESS_KEY_ID: ${{ secrets.OPENPHARMA_AWS_ACCESS_KEY_ID }}
OPENPHARMA_AWS_SECRET_ACCESS_KEY: ${{ secrets.OPENPHARMA_AWS_SECRET_ACCESS_KEY }}
OPENPHARMA_AWS_DEFAULT_REGION: ${{ secrets.OPENPHARMA_AWS_DEFAULT_REGION }}
OPENPHARMA_PAT: ${{ secrets.OPENPHARMA_PAT }}
run: |
snakemake -j4 -F all
mkdir build
cp index.html ./build
cp os-health.html ./build
- name: Deploy site 🚀
uses: JamesIves/[email protected]
if: ${{ github.ref == 'refs/heads/master' }}
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.