Skip to content

Commit

Permalink
Merge pull request #2 from digirati-co-uk/feature/sync-libis
Browse files Browse the repository at this point in the history
Added libis sync script
  • Loading branch information
sammeltassen authored Jul 9, 2024
2 parents 0330085 + 03fef89 commit 28d2945
Show file tree
Hide file tree
Showing 628 changed files with 96,272 additions and 83,816 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,5 @@ jobs:
## Netlify output
Static site (preview): ${{ steps.netlify_static_site.outputs.preview_url }}
IIIF (preview): ${{ steps.netlify_iiif.outputs.preview_url }}
IIIF Collection (preview): [Theseus](https://theseus-viewer.netlify.app/?iiif-content=${{ steps.netlify_iiif.outputs.preview_url }})
edit-mode: replace
36 changes: 36 additions & 0 deletions .github/workflows/sync-libis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sync Libis

on:
schedule:
# Daily schedule
- cron: "0 3 * * *"

workflow_dispatch: {}

jobs:
copy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup bun.sh environment
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- run: |
git clone --depth=1 --branch=main https://github.com/libis/ca_tudelft_iiif
pwd
ls
rm -r apps/iiif/manifests/collective-access/objects
rm -rf apps/iiif/manifests/collective-access/collections
cp -a ca_tudelft_iiif/objects/. apps/iiif/manifests/collective-access/objects
cp -a ca_tudelft_iiif/collections/. apps/iiif/manifests/collective-access/collections
rm -r ca_tudelft_iiif
bun run ./process-libis.mts
git config user.name github-actions
git config user.email [email protected]
git add .
git diff-index --quiet HEAD || git commit -m "Automatic publish from github.com/libis/ca_tudelft_iiif"
- run: git push origin main --force-with-lease
100 changes: 47 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,75 @@
# Turborepo starter
<h1 align="center">
Delft Static Site Generator
</h1>

This is an official starter Turborepo.
## 💫 About

## Using this example
Since 2017, when TU Delft celebrated its 175th anniversary, the university has been raising the profile of its academic heritage by systematically curating its collections, initiating research projects and organising on-campus presentations in collaboration with students and academic staff.

Run the following command:
This website provides access to the different facets of the academic heritage team of TU Delft Library: digital editions of exhibitions, (digitised) items from the special collections and research output.

```sh
npx create-turbo@latest
```
## 🚀 Developing locally

## What's inside?
1. **Dependancies**

This Turborepo includes the following packages/apps:
[Bun](https://bun.sh/)

### Apps and Packages
Bun is a fast javascript runtime similar (and mostly compatible) with NodeJS. It's well suited for the data processing used in the static site generator.

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
```sh
curl -fsSL https://bun.sh/install | bash
```

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
2. **Start developing.**

### Utilities
From the route of the project install the latest project dependancies and start the development server.

This Turborepo has some additional tools already setup for you:
```sh
bun install
```

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
then run a first build, to create the IIIF:
```sh
bun run build
```

### Build
to start the development server run

To build all apps and packages, run the following command:
```sh
bun dev
```

```
cd my-turborepo
pnpm build
```
3. **Open the source code and start editing!**

### Develop
Your site is now running at `http://localhost:3000`!

To develop all apps and packages, run the following command:
## 🧐 Directories?

```
cd my-turborepo
pnpm dev
```
The project is a [Monorepo](https://turbo.build/repo/docs) with multiple projects in the same repository. There are 2 main applications. The IIIF building pipeline and the static site. They can be found under the `apps` directory.

### Remote Caching
## 💫 Deploy

Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
Run auto linting on your code to conform to the project standards

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
```sh
bun run lint
```

```
cd my-turborepo
npx turbo login
```
Building the project. It is recommended you confirm the build is running and passing before any pushes to the project repository.

This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
```sh
bun run build
```

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
Once you have a running build push to the project repo and open a pull request. Netlify will automatically build a preview of your branch and the details are availible on the pull request if you add a label "Deploy preview" to the pull request.

```
npx turbo link
```
Main branch is automatically deployed to the live site.

## Useful Links
## Useful links

Learn more about the power of Turborepo:

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
[UX Wireframe](https://www.figma.com/file/emiQTuM5feCweZT4soUY4MJg/Wires?node-id=0:1)

[Demo site](https://delft-static-site-generator.netlify.com/)

[Changelog](https://github.com/digirati-co-uk/delft-static-site-generator/issues)
Loading

0 comments on commit 28d2945

Please sign in to comment.