We will be using several environments:
On this environment, we don't use Docker and deploy directly to Vercel in order to ease the development experience during the development phase.
You need to add a remote to your git repository:
git remote add vercel [email protected]:Weegle99/Geotrek-rando-v3.git
We performed a fork of Geotrek-rando on a personal account to benefit from Vercel free tier.
The staging deployment is automated upon pushing on the Vercel remote. Therefore you can deploy the current available version on the main
branch by:
- Pulling the latest
main
branch fromorigin
:
git checkout main && git pull origin main
- Pushing it to the Vercel remote:
git push vercel main
We deploy a new packaged image on the registry.
You need to have Docker installed.
You need to have access to the GeotrekCE
organization.
You need to have permissions on the Geotrek-rando-v3 packages -> go to this url.
- Merge all the changes you want to include on the
main
branch - Check the number of the current version on the package repository
- Checkout
main
locally and pull cd frontend
- Build the new image
docker build -t ghcr.io/geotrekce/geotrek-rando-v3/geotrek-rando-prebuild:latest -t ghcr.io/geotrekce/geotrek-rando-v3/geotrek-rando-prebuild:{NEW_VERSION} .
The "t" option is used to tag the image
First you'll need to have a Github personal access token with access permission to create packages. See this documentation if you don't manage to do it on your own.
- Push the new image on the Github package repository
docker push ghcr.io/geotrekce/geotrek-rando-v3/geotrek-rando-prebuild:latest && docker push ghcr.io/geotrekce/geotrek-rando-v3/geotrek-rando-prebuild:{NEW_VERSION}
- Go on the package repository to check that the new image is online
Follow the steps described in the install on your own machine documentation.