Skip to content

Commit

Permalink
doc(ci/cd): Document how to deploy in production
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Mar 20, 2024
1 parent f170424 commit 0d795c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
![license](https://img.shields.io/github/license/dataesr/works-magnet)
[![Production deployment](https://github.com/dataesr/works-magnet/actions/workflows/production.yml/badge.svg)](https://github.com/dataesr/works-magnet/actions/workflows/production.yml)


Retrieve the scholarly works of your institution - Based on French OSM and OpenAlex
Retrieve the scholarly works of your institution.

## Build for production

Expand All @@ -27,4 +26,16 @@ Web App available at http://localhost:5173/ and API at http://localhost:3000/.
npm run build
```

Vite build creates a build in `/dist` folder. This folder has to be moved to the `/server` folder.
Vite build creates a build in `/dist` folder. This folder has to be moved to the `/server` folder.

## Deployment

The version number follows [semver](https://semver.org/).

To deploy in production, simply run this command from your staging branch :

```sh
npm run deploy --level=[patch|minor|major]
```

:warning: Obviously, only members of the [dataesr organization](https://github.com/dataesr/) have rights to push on the repo.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build": "rm -rf server/dist && npm -w client run build -- --mode ${npm_config_mode} --emptyOutDir --outDir ../server/dist",
"client": "npm -w client run dev",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"deploy": "git switch main && git pull origin main --rebase --tags && git merge origin staging && npm version $npm_config_level && git push origin main --tags && git switch staging",
"preview": "npm run build --mode=${npm_config_mode} && npm -w server start",
"server": "npm -w server run dev",
"start": "npm run dev"
Expand Down

0 comments on commit 0d795c5

Please sign in to comment.