|
| 1 | +## Adding content to the site |
| 2 | + |
| 3 | +See the [frontend README](../frontend/README.md#adding-content) |
| 4 | +for instructions on how to add static pages to the site via markdown files. |
| 5 | + |
| 6 | +## Importing the petrographic metadata |
| 7 | + |
| 8 | +See [the petrographic import documentation](./petrographic-import.md) |
| 9 | +for details. |
| 10 | + |
| 11 | +## Editorial and release workflow |
| 12 | + |
| 13 | +Changes to the content or code should normally happen on the `develop` branch. |
| 14 | +Any commit on that branch will automatically trigger a release |
| 15 | +to the **[staging/preview site](https://kingsdigitallab.github.io/corpus-building/)**. |
| 16 | + |
| 17 | +Once the changes accumulated on the staging site are ready for public release |
| 18 | +they can be merged dierectly into the `main` branch by a developer. |
| 19 | +Alternatively non-developers can create |
| 20 | +[a new Pull Request](https://github.com/kingsdigitallab/corpus-building/compare/main...develop) |
| 21 | +to be reviewed and merged by someone else. |
| 22 | + |
| 23 | +Any update of the `main` branch will automatically trigger a release |
| 24 | +via SSH to the **[public/live/production site](https://sicily.classics.ox.ac.uk/)** |
| 25 | +hosted on Oxford server. |
| 26 | + |
| 27 | +### Automated release process |
| 28 | + |
| 29 | +In both cases |
| 30 | +[the automated release process](https://github.com/kingsdigitallab/corpus-building/blob/main/.github/workflows/frontend.yml) |
| 31 | +from a modified branch first does the following: |
| 32 | +1. fetches the latest version of the TEI corpus from https://github.com/ISicily/ISicily |
| 33 | +2. run the ETL process from that corpus to rebuild the site metadata and indices |
| 34 | +3. run some automated tests and stops the release if any fails |
| 35 | +4. commit the updated metadata and indices to the branch |
| 36 | + |
| 37 | +The release process may take up to 30 minutes to complete. |
| 38 | +[Current and past release workflows are visible on the Actions tab](https://github.com/kingsdigitallab/corpus-building/actions) |
| 39 | +of the repository. |
| 40 | +There can be a slight delay between the end of the action |
| 41 | +and the actual refresh of the content on the target site. |
| 42 | +Also note that [hard-refresh in your browser](https://www.wikihow.com/Force-Refresh-in-Your-Internet-Browser) |
| 43 | +may be needed to flush old, cached content. |
| 44 | + |
| 45 | +### Hot fixes |
| 46 | + |
| 47 | +Small **[hot fixes](https://en.wikipedia.org/wiki/Hotfix)** |
| 48 | +to the code or content of the live site can be done |
| 49 | +with a Pull Request directly on the `main` branch. |
| 50 | +In that situation extra care should be taken when verifying the changes. |
| 51 | + |
| 52 | +### Changes to the corpus |
| 53 | + |
| 54 | +Although the automated release process pulls [the latest version |
| 55 | +of the TEI corpus from the `main` branch of the ISicily repository](https://github.com/ISicily/ISicily/tree/master/inscriptions), |
| 56 | +only changes in the code of this repository will trigger the process. |
| 57 | + |
| 58 | +If you only want to update the metadata about the TEI corpus on a site |
| 59 | +(staging or production) then you can manually trigger the release process |
| 60 | +by following those steps: |
| 61 | +1. go to the [Build and deploy workflow](https://github.com/kingsdigitallab/corpus-building/actions/workflows/frontend.yml) on the Corpus Building repository; |
| 62 | +2. click the "Run workflow" dropdown on the right,, just above the table; |
| 63 | +3. select the relevant branch (`main` for live site, `develop` for staging site); |
| 64 | +4. confirm by clicking the "Run workflow" button |
| 65 | + |
| 66 | +<img width="932" height="544" alt="Screenshot_20260805_121747" src="https://github.com/user-attachments/assets/221f1737-18c7-40c0-8ab0-d2ef80a112ba" /> |
| 67 | + |
| 68 | +You should be redirected to a new page for that release job |
| 69 | +where you can see its running status in real time. |
| 70 | +You'll notice a "Cancel workflow" button in the top right corner |
| 71 | +to interrupt the job. You can't resume a cancelled job; |
| 72 | +instead you would run a new one. |
| 73 | + |
| 74 | +<img width="1139" height="736" alt="Screenshot_20260805_121201" src="https://github.com/user-attachments/assets/153dcc5e-3b27-4399-8f2a-25ba2d3e3555" /> |
| 75 | + |
| 76 | +You can also see all the current and past jobs on the |
| 77 | +[Build and deploy workflow](https://github.com/kingsdigitallab/corpus-building/actions/workflows/frontend.yml) page. |
| 78 | +The color of the icon in fron of each row indicates the status of the job: |
| 79 | +animated orange is curently running; blue tick was successful; |
| 80 | +red cross failed; and greyed was cancelled. |
| 81 | + |
| 82 | +<img width="932" height="757" alt="Screenshot_20260805_121318" src="https://github.com/user-attachments/assets/d4ca61e3-2814-4647-b20d-72f907de5b22" /> |
0 commit comments