Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ on:
push:
branches: ['main']

env:
AWS_REGION: ${{ vars.AWS_DEFAULT_REGION }}
AWS_ACCOUNT_ID: ${{ vars.AWS_CELLS_ACCOUNT_ID }}

permissions:
contents: write
pages: write
id-token: write

jobs:
build:
deploy-staging:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -34,3 +38,32 @@ jobs:
folder: ./dist
clean-exclude: pr-preview/
branch: gh-pages

deploy-prod:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV

- name: Configure AWS credentials with OIDC
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/github_cellpack
role-session-name: github_cellpack-${{ env.SHORT_SHA }}
aws-region: ${{ env.AWS_REGION }}

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Install
run: bun install

- name: Build with Vite
run: bun run build

- name: Copy files to production bucket
run: aws s3 sync ./dist/ s3://cellpack-datasets/ --delete
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ Typical steps to contribute:

4. Submit a pull request to merge your fork's branch into this repository, via GitHub.

## Deployment

#### Staging deployment
Automatically builds from `main`
- [Staging site](https://allencell.github.io/cellpack-client/)

#### Production deployment
Make sure the main branch is checked out and all desired changes are merged. Then:
1. Make a new version: `bun pm version [patch/minor/major]` -- this will give you the new tag, e.g., `1.3.2`
2. Push the new package.json version: `git push origin main`
3. Push the new tag: `git push origin [NEW_TAG]` -- e.g. `git push origin v1.3.2`
4. Write up [release notes](https://github.com/AllenCell/cellpack-client/releases).
- Select the tag
- Click "generate release notes"
- Use this template to summarize changes (delete any categories that aren't relevant)

## Questions or Thoughts?

Talk to us on [one of our community forums][community].
Expand Down