Skip to content

Commit d92f296

Browse files
Merge pull request #58 from OCNS/dev
Deploy to "staging" and "production"
2 parents d4b02a6 + ed3bb51 commit d92f296

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/deploy.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,20 @@ on:
44
branches:
55
- main
66
jobs:
7+
deploy_staging: # Always deploy to staging
8+
name: Deploy app to simselect-dev
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- run: sed -i 's/simselect/simselect-dev/g' fly.toml
13+
- uses: superfly/flyctl-actions/setup-flyctl@master
14+
- run: flyctl deploy --remote-only
15+
env:
16+
FLY_API_TOKEN: ${{ secrets.FLY_STAGING_API_TOKEN }}
17+
718
deploy:
8-
name: Deploy app
19+
name: Deploy app # Deploy to production only when a tag is pushed
20+
if: github.repository == 'OCNS/simselect' && startsWith(github.ref, 'refs/tags')
921
runs-on: ubuntu-latest
1022
steps:
1123
- uses: actions/checkout@v3

CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ Now, the pre-commit checks will be run before each commit.
1818

1919
Data on each tool is included in individual files in the `simselect` directory.
2020
To make changes, please fork the repository, make any necessary changes, and open pull requests for community review.
21+
22+
### Deployment
23+
The web app is hosted on [fly.io](https://fly.io/). It gets deployed automatically
24+
via a [GitHub Action](.github/workflows/deploy.yml). When a pull request is merged into ``main``, it will be deployed
25+
to https://simselect-dev.fly.dev. A tagged release will be deployed to https://simselect.fly.dev.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ pre-commit install
4747
Now, the pre-commit checks will be run before each commit.
4848

4949
## Deployment
50-
The web app is hosted on [fly.io](https://fly.io/). See https://simselect.fly.dev/ for the latest version.
50+
The web app is hosted on [fly.io](https://fly.io/). See https://simselect.fly.dev/ for the latest released (tagged) version, and
51+
https://simselect-dev.fly.dev for the latest version directly built from the ``main`` branch.
5152

5253

5354
## Contributors

0 commit comments

Comments
 (0)