Skip to content

Commit f4ecdbc

Browse files
authored
Merge pull request #236 from mapswipe/fix/project-status
fix(mapswipe): Update project status
2 parents 89deaa1 + 65898a5 commit f4ecdbc

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ touch .env.local
1313
Set these environment variables:
1414

1515
```env
16-
MAPSWIPE_API_ENDPOINT=https://apps.mapswipe.org/api/
17-
MAPSWIPE_COMMUNITY_API_ENDPOINT=https://api.mapswipe.org/graphql/
16+
APP_ENVIRONMENT=DEV
17+
MAPSWIPE_API_ENDPOINT=https://backend.mapswipe.org/
18+
MAPSWIPE_REFERRER_ENDPOINT=https://website.mapswipe.org/
1819
NEXT_PUBLIC_POSTHOG_KEY=<posthog-key>
1920
NEXT_PUBLIC_POSTHOG_HOST_API=<posthog-host-api>
2021
```
@@ -24,7 +25,9 @@ NEXT_PUBLIC_POSTHOG_HOST_API=<posthog-host-api>
2425
```bash
2526
yarn install
2627
# This fetches latest data from MapSwipe database for projects
27-
yarn fetch-data
28+
yarn fetch-data:local
29+
30+
> NOTE: Currently the platform runs smoothly in node 16, so developers might have to switch to node 16 for development.
2831
yarn dev
2932
```
3033

@@ -50,7 +53,35 @@ yarn unimported
5053
yarn build
5154
```
5255

53-
### Automatic Deployment
56+
### Staging Deployment
57+
58+
The **staging environment** is used to test new changes before they are deployed to production.
59+
You can view the live staging site here:
60+
🔗 [https://website-stage.mapswipe.org/](https://website-stage.mapswipe.org/)
61+
62+
### Steps to Deploy to Staging
63+
64+
1. **Rebase your branch onto the staging branch:**
65+
66+
```bash
67+
git checkout stage
68+
git rebase <branch-you-want-to-deploy>
69+
git push
70+
```
71+
72+
This rebases your feature branch onto the `stage` branch and pushes the updated staging branch.
73+
74+
2. **Trigger the staging deployment:**
75+
76+
The staging deployment is managed through this repository:
77+
🔗 [https://github.com/mapswipe/stage-website/](https://github.com/mapswipe/stage-website/)
78+
79+
You can manually trigger the deployment workflow here:
80+
🔗 [Staging Workflow – stage.yml](https://github.com/mapswipe/stage-website/actions/workflows/stage.yml)
81+
82+
> **Note:** The staging environment also auto-deploys every day at **01:00 UTC**.
83+
84+
### Production Deployment
5485

5586
Deployments will be triggered in 2 ways:
5687

scripts/fetchData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const query = gql`
3434
publicProjects(
3535
filters: {
3636
status: {
37-
inList: [PUBLISHED, FINISHED, WITHDRAWN],
37+
inList: [PUBLISHED, FINISHED],
3838
},
3939
},
4040
pagination: { limit: 9999 },

src/pages/[locale]/data/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,12 @@ function Data(props: Props) {
394394
description: string;
395395
fileLabel: string;
396396
}> = {
397-
PROJECT_STATS_BY_TYPES: {
397+
PROJECTS_CSV: {
398398
heading: t('download-projects-overview-heading'),
399399
description: t('download-projects-overview-description'),
400400
fileLabel: 'CSV',
401401
},
402-
PROJECTS_CSV: {
402+
PROJECT_STATS_BY_TYPES: {
403403
heading: t('download-projects-csv-heading'),
404404
description: t('download-projects-csv-description'),
405405
fileLabel: 'CSV',

0 commit comments

Comments
 (0)