Filter ORA results in differential_expression.qmd #5
Workflow file for this run
This file contains hidden or 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: Differential Expression Report | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '02_differential_expression/differential_expression.qmd' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '02_differential_expression/differential_expression.qmd' | |
| workflow_dispatch: | |
| jobs: | |
| r-deg: | |
| runs-on: ubuntu-22.04 | |
| env: | |
| RENV_PATHS_ROOT: ~/.local/share/renv # persistent cache location | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Install system dependencies for R packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev libmagick++-dev libharfbuzz-dev libfribidi-dev | |
| shell: bash | |
| - name: Cache R packages (renv) | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RENV_PATHS_ROOT }} | |
| key: ${{ runner.os }}-renv-${{ hashFiles('02_differential_expression/renv.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-renv- | |
| - name: Set repositories | |
| run: Rscript ubuntu.R | |
| - name: Restore environment from renv.lock | |
| run: | | |
| install.packages("renv", repos = "https://cloud.r-project.org") | |
| renv::restore(prompt = FALSE, lockfile = "02_differential_expression/renv.lock") | |
| shell: Rscript {0} | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Run DEG report | |
| id: render_deg | |
| run: | | |
| cd 02_differential_expression | |
| quarto render differential_expression.qmd | |
| shell: bash | |
| - name: Deploy HTML to gh-pages | |
| if: success() | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| OUTPUT_FILE="02_differential_expression/differential_expression.html" | |
| # Fetch gh-pages (if exists) and create worktree | |
| git fetch origin gh-pages || true | |
| git worktree add /tmp/gh-pages gh-pages 2>/dev/null || git worktree add /tmp/gh-pages -b gh-pages | |
| # Copy the file into the worktree | |
| mkdir -p "/tmp/gh-pages/$(dirname "$OUTPUT_FILE")" | |
| cp "$OUTPUT_FILE" "/tmp/gh-pages/$(dirname "$OUTPUT_FILE")/" | |
| cd /tmp/gh-pages | |
| # Commit and push if there are changes | |
| git add "$(dirname "$OUTPUT_FILE")/$(basename "$OUTPUT_FILE")" | |
| git commit -m "Deploy $(basename "$OUTPUT_FILE") [skip ci]" | |
| git push --force origin gh-pages | |
| shell: bash |