Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #306 from jashapiro/jashapiro/rootstock-2022-08-11
Browse files Browse the repository at this point in the history
Update rootstock
  • Loading branch information
jashapiro authored Aug 11, 2022
2 parents 84fbe1c + 9f2e7f4 commit ee2e934
Show file tree
Hide file tree
Showing 38 changed files with 3,695 additions and 4,090 deletions.
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ skip_branch_with_pr: true
# to only build commits from pull requests
branches:
only:
- main
- master

# Only run AppVeyor on commits that modify at least one of the following files
# Delete these lines to run AppVeyor on all master branch commits
# Delete these lines to run AppVeyor on all main/master branch commits
only_commits:
files:
- .appveyor.yml
Expand Down
70 changes: 54 additions & 16 deletions .github/workflows/manubot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,100 @@ name: Manubot
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
# NOTE: scheduled workflows aren't supported
# https://github.jparrowsec.cnmunity/t/github-event-repository-fork-context-does-detect-forks-in-scheduled-jobs/185925
workflow_dispatch:
inputs:
BUILD_PDF:
type: boolean
description: generate PDF output
default: true
BUILD_DOCX:
type: boolean
description: generate DOCX output
default: true
BUILD_LATEX:
type: boolean
description: generate LaTeX output
default: false
SPELLCHECK:
type: boolean
description: Check spelling
default: true
MANUBOT_USE_DOCKER:
type: boolean
description: Use Docker to generate PDF
default: true
jobs:
manubot:
name: Manubot
runs-on: ubuntu-latest
env:
GITHUB_PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
# Set SPELLCHECK to true/false for whether to check spelling in this action.
# For workflow dispatch jobs, this SPELLCHECK setting will be overridden by the user input.
SPELLCHECK: true
defaults:
run:
shell: bash --login {0}
steps:
- name: Set Environment Variables
run: |
TRIGGERING_SHA=${GITHUB_PULL_REQUEST_SHA:-$GITHUB_SHA}
echo "TRIGGERING_SHA_7=${TRIGGERING_SHA::7}" >> $GITHUB_ENV
echo "TRIGGERING_SHA: $TRIGGERING_SHA"
- name: Checkout Repository
uses: actions/checkout@v2
with:
# fetch entire commit history to support get_rootstock_commit
fetch-depth: 0
- name: Set Environment Variables (Workflow Dispatch)
if: github.event_name == 'workflow_dispatch'
run: |
echo "BUILD_PDF=${{ github.event.inputs.BUILD_PDF }}" >> $GITHUB_ENV
echo "BUILD_DOCX=${{ github.event.inputs.BUILD_DOCX }}" >> $GITHUB_ENV
echo "BUILD_LATEX=${{ github.event.inputs.BUILD_LATEX }}" >> $GITHUB_ENV
echo "SPELLCHECK=${{ github.event.inputs.SPELLCHECK }}" >> $GITHUB_ENV
echo "MANUBOT_USE_DOCKER=${{ github.event.inputs.MANUBOT_USE_DOCKER }}" >> $GITHUB_ENV
- name: Set Environment Variables
run: |
TRIGGERING_SHA=${GITHUB_PULL_REQUEST_SHA:-$GITHUB_SHA}
echo "TRIGGERING_SHA_7=${TRIGGERING_SHA::7}" >> $GITHUB_ENV
echo "TRIGGERING_SHA: $TRIGGERING_SHA"
DEFAULT_BRANCH=${{ github.event.repository.default_branch }}
echo "DEFAULT_BRANCH=${DEFAULT_BRANCH}" >> $GITHUB_ENV
echo "DEFAULT_BRANCH_REF=refs/heads/$DEFAULT_BRANCH" >> $GITHUB_ENV
echo "DEFAULT_BRANCH=$DEFAULT_BRANCH"
- name: Cache
uses: actions/cache@v1
with:
path: ci/cache
key: ci-cache-${{ github.ref }}
restore-keys: |
ci-cache-refs/heads/master
ci-cache-${{ env.DEFAULT_BRANCH_REF }}
- name: Install Environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: manubot
environment-file: build/environment.yml
auto-activate-base: false
miniconda-version: 'latest'
miniforge-version: 'latest'
- name: Install Spellcheck
shell: bash --login {0}
run: |
if [ "${SPELLCHECK:-}" = "true" ]; then
bash ci/install-spellcheck.sh
fi
if: env.SPELLCHECK == 'true'
run: bash ci/install-spellcheck.sh
- name: Build Manuscript
shell: bash --login {0}
run: BUILD_DOCX=true bash build/build.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: manuscript-${{ github.run_id }}-${{ env.TRIGGERING_SHA_7 }}
path: output
- name: Deploy Manuscript
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && !github.event.repository.fork
if: github.ref == env.DEFAULT_BRANCH_REF && github.event_name != 'pull_request' && !github.event.repository.fork
env:
MANUBOT_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MANUBOT_SSH_PRIVATE_KEY: ${{ secrets.MANUBOT_SSH_PRIVATE_KEY }}
CI_BUILD_WEB_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks
CI_JOB_WEB_URL: https://github.com/${{ github.repository }}/runs/${{ github.run_id }}
shell: bash --login {0}
CI_JOB_WEB_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: bash ci/deploy.sh
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- usage note: edit the H1 title above to personalize the manuscript -->

[![HTML Manuscript](https://img.shields.io/badge/manuscript-HTML-blue.svg)](https://AlexsLemonade.github.io/OpenPBTA-manuscript/)
[![PDF Manuscript](https://img.shields.io/badge/manuscript-PDF-blue.svg)](https://AlexsLemonade.github.io/OpenPBTA-manuscript/manuscript.pdf)
[![GitHub Actions Status](https://github.com/AlexsLemonade/OpenPBTA-manuscript/workflows/Manubot/badge.svg)](https://github.com/AlexsLemonade/OpenPBTA-manuscript/actions)
[![HTML Manuscript](https://img.shields.io/badge/manuscript-HTML-blue.svg)](https://manubot.github.io/rootstock/)
[![PDF Manuscript](https://img.shields.io/badge/manuscript-PDF-blue.svg)](https://manubot.github.io/rootstock/manuscript.pdf)
[![GitHub Actions Status](https://github.com/manubot/rootstock/workflows/Manubot/badge.svg)](https://github.com/manubot/rootstock/actions)

## Manuscript description

Expand Down Expand Up @@ -81,13 +81,13 @@ Whenever a pull request is opened, CI (continuous integration) will test whether
The build process aims to detect common errors, such as invalid citations.
If your pull request build fails, see the CI logs for the cause of failure and revise your pull request accordingly.

When a commit to the `master` branch occurs (for example, when a pull request is merged), CI builds the manuscript and writes the results to the [`gh-pages`](https://github.com/manubot/rootstock/tree/gh-pages) and [`output`](https://github.com/manubot/rootstock/tree/output) branches.
When a commit to the `main` branch occurs (for example, when a pull request is merged), CI builds the manuscript and writes the results to the [`gh-pages`](https://github.com/manubot/rootstock/tree/gh-pages) and [`output`](https://github.com/manubot/rootstock/tree/output) branches.
The `gh-pages` branch uses [GitHub Pages](https://pages.github.com/) to host the following URLs:

+ **HTML manuscript** at https://AlexsLemonade.github.io/OpenPBTA-manuscript/
+ **PDF manuscript** at https://AlexsLemonade.github.io/OpenPBTA-manuscript/manuscript.pdf

For continuous integration configuration details, see [`.github/workflows/manubot.yaml`](.github/workflows/manubot.yaml) if using GitHub Actions or [`.travis.yml`](.travis.yml) if using Travis CI.
For continuous integration configuration details, see [`.github/workflows/manubot.yaml`](.github/workflows/manubot.yaml).

## License

Expand Down
Loading

0 comments on commit ee2e934

Please sign in to comment.