Skip to content

Commit

Permalink
Fix deployment of plugin to prod
Browse files Browse the repository at this point in the history
skip-checks:true

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Oct 8 02:07:40 2024 +0000
#
# On branch data_load_use_actions
# Your branch is up to date with 'origin/data_load_use_actions'.
#
# Changes to be committed:
#	modified:   .github/workflows/deploy.yml
#
# Changes not staged for commit:
#	modified:   .gitignore
#	modified:   .vscode/settings.json
#	modified:   packages/jbrowse-plugin-apollo/src/OntologyManager/index.ts
#	modified:   packages/jbrowse-plugin-apollo/src/config.ts
#	modified:   packages/jbrowse-plugin-apollo/src/session/ClientDataStore.ts
#
  • Loading branch information
garrettjstevens committed Oct 10, 2024
1 parent 837f863 commit 0277d28
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
jobs:
build:
name: Build and upload
if: inputs.environment == 'staging'
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -37,6 +38,25 @@ jobs:
path: |
packages/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.development.js
packages/jbrowse-plugin-apollo/dist/jbrowse-plugin-apollo.umd.production.min.js
fetch:
name: Fetch from NPM and upload
if: inputs.environment == 'prod'
runs-on: ubuntu-latest
steps:
- name: Fetch from NPM
run: |
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:
name: plugin
path: |
./jbrowse-plugin-apollo.umd.development.js
./jbrowse-plugin-apollo.umd.production.min.js
deploy:
name: Deploy to ${{ inputs.environment }} demo server
runs-on: ubuntu-latest
Expand Down

0 comments on commit 0277d28

Please sign in to comment.