Skip to content

Commit

Permalink
Merge pull request #259 from OpenHistoricalMap/web-embedfix
Browse files Browse the repository at this point in the history
Update website commithash, and also improve deploy docs
  • Loading branch information
danrademacher authored Jan 4, 2024
2 parents e25aafe + ea38dfc commit f41a30b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@ You can't really test this code locally, which can make it tempting to commit ch

For updating the OHM website, which is a common reason for a deploy, see these lines:

https://github.com/OpenHistoricalMap/ohm-deploy/blob/main/images/web/Dockerfile#L118-L121
https://github.com/OpenHistoricalMap/ohm-deploy/blob/main/images/web/Dockerfile#L52

```
#change commit hash here to pick up latest changes
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=xyz
```
and line 58:
```
# change the echo here with a reason for changing the commithash
RUN echo 'Set the right commit: iD and staging tiles for staging website'
RUN git fetch
RUN git checkout 293d27abe0ed16abba7dd5849a29a5d3c7de4588
RUN echo 'message about change'
```
Change the message as appropriate and the commit hash to whatever commit in the `ohm-website` repo that you want to deploy.

By practice, commit hashes from the `staging` branch on `ohm-website` should go to `staging` here and commit hashes from `production` on `ohm-website` should go to `main` here.

That said, there are times when we have published feature branches to `staging` to allow them to be viewed and tested by people who are not running the stack locally. That is fine, but should not be done for `main`.

## More details on process for changing, testing, and deploying

This is what the process of making changes to openhistoricalmap.org looks like:
Expand All @@ -38,4 +37,4 @@ This is what the process of making changes to openhistoricalmap.org looks like:
3. When your changes are working as desired, submit a PR from your feature branches into staging. Assign Dan, Sanjay, or Sajjad to review that PR. We can merge into `staging` and then update the commit hash on the staging branch of this repo, here https://github.com/OpenHistoricalMap/ohm-deploy/blob/staging/images/web/Dockerfile#L119-L121
4. When we do that and push here, that kicks off a Github Actions automated deploy that will make your changes live on https://staging.openhistoricalmap.org.
5. Test on Staging. This is when we can review with folks who are not running locally, share with the community, etc.
6. When we're all happy with the code on Staging, we go back to `ohm-website` repo and make a PR of `staging` into `production` and then update the commit hash on the `main` branch in this OHM-deploy repo, which then kicks off deploy to production to make changes live on https://openhistoricalmap.org.
6. When we're all happy with the code on Staging, make a PR of `staging` into `main` branch in this OHM-deploy repo, which then kicks off deploy to production to make changes live on https://openhistoricalmap.org.
4 changes: 2 additions & 2 deletions images/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ RUN npm install -g svgo

# Install openstreetmap-website
RUN rm -rf $workdir/html
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=00bd7fddee2bd214d0ad3cda81e8c294b0d4c48d
ENV OPENHISTORICALMAP_WEBSITE_GITSHA=3f1566224aa8d6b67ee7edc10f3d69f97773b506
RUN git clone -b staging https://github.com/OpenHistoricalMap/ohm-website.git $workdir
WORKDIR $workdir
RUN git checkout $OPENHISTORICALMAP_WEBSITE_GITSHA

# change the echo here with a reason for changing the commithash
RUN echo 'update gems, mapstyle, move to MapLibre, update iD'
RUN echo 'update map embed'
RUN git fetch

# Install Ruby packages
Expand Down

0 comments on commit f41a30b

Please sign in to comment.