Skip to content

Commit

Permalink
Run data reloading directly on actions
Browse files Browse the repository at this point in the history
This way we can get better results
  • Loading branch information
garrettjstevens committed Oct 10, 2024
1 parent a9a9b25 commit 51f944e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
build:
name: Build and upload
name: Build or fetch and upload
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -26,10 +26,23 @@ jobs:
node-version: 18
cache: yarn
- name: Install
if: inputs.environment == 'staging'
run: yarn --immutable
- name: Build plugin
if: inputs.environment == 'staging'
run: yarn build
working-directory: packages/jbrowse-plugin-apollo
- name: Fetch plugin
if: inputs.environment == 'prod'
working-directory: packages/jbrowse-plugin-apollo
run: |
mkdir --parents dist
cd dist/
wget --output-document=- --quiet https://registry.npmjs.org/@apollo-annotation/jbrowse-plugin-apollo/ > jpa.json
LATEST_VERSION=$(jq --raw-output '."dist-tags".latest' jpa.json)
TARBALL=$(jq --raw-output ".versions.\"${LATEST_VERSION}\".dist.tarball" jpa.json)
wget --output-document=- --quiet ${TARBALL} | \
tar --extract --gzip --file=- --strip=2 package/dist/jbrowse-plugin-apollo.umd.development.js package/dist/jbrowse-plugin-apollo.umd.production.min.js
- name: Upload built plugin files
uses: actions/upload-artifact@v4
with:
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/reload_demo_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
HostName ${{ steps.ec2-describe-instances.outputs.INSTANCE_ADDRESS }}
User ec2-user
IdentityFile ~/.ssh/staging
ServerAliveInterval 60
ServerAliveCountMax 10
END
ssh-keyscan -H ${{ steps.ec2-describe-instances.outputs.INSTANCE_ADDRESS }} >> ~/.ssh/known_hosts
- name: Create Docker context
Expand All @@ -55,11 +57,6 @@ jobs:
--description "Staging server"
- name: Load data
run: |
set -e
set -u
set -o pipefail
set -x
docker pull ghcr.io/gmod/apollo-cli:${{ vars.DOCKER_TAG }}
function apollo() {
docker \
Expand All @@ -75,6 +72,7 @@ jobs:
"$@"
}
set -x
apollo config address http://host.docker.internal/apollo
apollo config accessType root
apollo config rootCredentials.username ${{ secrets.ROOT_USER_NAME }}
Expand All @@ -84,6 +82,15 @@ jobs:
apollo assembly get | apollo assembly delete --verbose --assembly -
apollo file get | apollo file delete
apollo assembly \
add-from-fasta \
/data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz \
--fai /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz.fai \
--gzi /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz.gzi \
--assembly 'Schistosoma haematobium' \
--not-editable
apollo assembly \
add-from-fasta \
/data/schistosoma_mansoni.PRJEA36577.WBPS19.genomic.fa.gz \
Expand All @@ -94,18 +101,10 @@ jobs:
apollo feature \
import \
--input-file /data/schistosoma_mansoni.PRJEA36577.WBPS19.annotations.genes.gff3 \
--assembly 'Schistosoma mansoni'
apollo assembly \
add-from-fasta \
/data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa \
--fai /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz.fai \
--gzi /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.genomic.fa.gz.gzi \
--assembly 'Schistosoma haematobium' \
--not-editable
--input-file /data/schistosoma_haematobium.TD2_PRJEB44434.WBPS19.annotations.genes.gff3 \
--assembly 'Schistosoma haematobium'
apollo feature \
import \
--input-file /data/schistosoma_mansoni.PRJEA36577.WBPS19.annotations.genes.gff3 \
--assembly 'Schistosoma haematobium'
--assembly 'Schistosoma mansoni'

0 comments on commit 51f944e

Please sign in to comment.