Repository navigation
Add specs for APA implementation #95
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: Deploy website | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| - name: Setup pixi | |
| uses: prefix-dev/setup-pixi@v0.9.5 | |
| - name: Install susieR from GitHub master | |
| # mfsusieR depends on internals (e.g. compute_marginal_bhat_shat, | |
| # the S3 generic optimize_prior_variance, ibss_workhorse) that | |
| # are exported on susieR master but not yet in the conda r-susier | |
| # build. Override with the GitHub master tip. | |
| run: pixi run -e r44 R -e 'remotes::install_github("stephenslab/susieR", upgrade = "never")' | |
| - name: Compute coverage (writes /tmp/coverage.json) | |
| run: | | |
| pixi run -e r44 R -e ' | |
| cov <- covr::package_coverage(quiet = TRUE); | |
| pct <- covr::percent_coverage(cov); | |
| cat(sprintf("Computed coverage: %.2f%%\n", pct)); | |
| color <- if (pct >= 90) "brightgreen" else if (pct >= 80) "green" else if (pct >= 70) "yellowgreen" else if (pct >= 60) "yellow" else if (pct >= 50) "orange" else "red"; | |
| jsonlite::write_json(list(schemaVersion = 1L, label = "coverage", message = sprintf("%.1f%%", pct), color = color), path = "/tmp/coverage.json", auto_unbox = TRUE); | |
| cat("Wrote /tmp/coverage.json:\n", readLines("/tmp/coverage.json"), "\n", sep = "") | |
| ' | |
| - name: Update pkgdown site | |
| run: pixi run -e r44 pkgdown_build | |
| - name: Copy coverage.json into docs/ for Pages deploy | |
| run: | | |
| mkdir -p docs | |
| cp /tmp/coverage.json docs/coverage.json | |
| echo "docs/coverage.json contents:" | |
| cat docs/coverage.json | |
| echo | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: ./docs | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |