Skip to content

Commit

Permalink
Merge branch 'main' into pr/24
Browse files Browse the repository at this point in the history
  • Loading branch information
sammeltassen committed Nov 20, 2024
2 parents 48b5ab4 + aae0afe commit c73cfd1
Show file tree
Hide file tree
Showing 61 changed files with 43,527 additions and 9,831 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,22 @@ jobs:
id: netlify_iiif
working-directory: apps/iiif
run: |
deploy_json=$(netlify deploy \
deploy_json=$(npx netlify[email protected] deploy \
--build \
--prod \
--json \
--filter=iiif \
--message="Deploy from GitHub Actions")
preview_url=$(echo $deploy_json | jq -r '.deploy_url')
echo "preview_url=$preview_url" >> $GITHUB_OUTPUT
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_IIIF_SITE_ID }}
IIIF_PREVIEW_URL: https://delft-iiif.netlify.app
IIIF_PREVIEW_URL: https://heritage.tudelft.nl/iiif

- name: Static site Netlify deploy (production)
id: netlify_static_site
working-directory: apps/static-site
run: |
deploy_json=$(netlify deploy \
deploy_json=$(npx netlify[email protected] deploy \
--build \
--json \
--prod \
Expand All @@ -70,7 +68,7 @@ jobs:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# This is a search-only API key (public)
NEXT_PUBLIC_IIIF_URL: https://delft-iiif.netlify.app
NEXT_PUBLIC_IIIF_URL: https://heritage.tudelft.nl/iiif
NEXT_PUBLIC_TYPESENSE_API_KEY: 8EOitKCMTbxUKPZNqUEoQS9M2RGvpkZS
NEXT_PUBLIC_TYPESENSE_HOST: 63flhve71t2un5xgp.a1.typesense.net
NEXT_PUBLIC_TYPESENSE_PORT: 443
Expand Down
62 changes: 57 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build and Deploy Static Site Preview

on:
pull_request:
types: [opened, synchronize, reopened, labeled]

jobs:
build:
Expand Down Expand Up @@ -43,16 +44,62 @@ jobs:
restore-keys: |
${{ runner.os }}-iiif-cache-${{ hashFiles('**/bun.lockb') }}
- name: "Cleanup Netlify folder"
run: |
ls -la ./.netlify || true
rm -rf ./.netlify || true
# This is a debug versino of the normal build.
- name: IIIF Netlify deploy (debug build)
id: netlify_iiif_debug
if: (contains(github.event.pull_request.labels.*.name, 'debug-build'))
working-directory: apps/iiif
run: |
npx [email protected] deploy \
--build \
--alias=deploy-debug-${{ github.event.number }} \
--message="Deploy preview from GitHub Actions (debug)"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_IIIF_SITE_ID }}
IIIF_PREVIEW_URL: https://deploy-debug-${{ github.event.number }}--delft-iiif.netlify.app

- name: "Cleanup Netlify folder"
run: |
ls -la ./.netlify || true
rm -rf ./.netlify || true
# This is the debug static site build.
- name: Static site Netlify deploy (debug)
id: netlify_static_site_debug
if: (contains(github.event.pull_request.labels.*.name, 'debug-build'))
run: |
npx [email protected] deploy \
--build \
--filter=static-site \
--alias=deploy-debug-${{ github.event.number }} \
--message="Deploy debug from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# This is a search-only API key (public)
NEXT_PUBLIC_IIIF_URL: https://deploy-debug-${{ github.event.number }}--delft-iiif.netlify.app
NEXT_PUBLIC_TYPESENSE_API_KEY: 8EOitKCMTbxUKPZNqUEoQS9M2RGvpkZS
NEXT_PUBLIC_TYPESENSE_HOST: 63flhve71t2un5xgp.a1.typesense.net
NEXT_PUBLIC_TYPESENSE_PORT: 443
NEXT_PUBLIC_TYPESENSE_PROTOCOL: https
NEXT_PUBLIC_TYPESENSE_COLLECTION_NAME: preview-manifests

# This is the actual IIIF build.
- name: IIIF Netlify deploy (preview)
id: netlify_iiif
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy-preview'))
working-directory: apps/iiif
run: |
deploy_json=$(netlify deploy \
deploy_json=$(npx netlify[email protected] deploy \
--build \
--alias=deploy-preview-${{ github.event.number }} \
--json \
--filter=iiif \
--message="Deploy preview from GitHub Actions")
preview_url=$(echo $deploy_json | jq -r '.deploy_url')
echo "preview_url=$preview_url" >> $GITHUB_OUTPUT
Expand All @@ -61,16 +108,21 @@ jobs:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_IIIF_SITE_ID }}
IIIF_PREVIEW_URL: https://deploy-preview-${{ github.event.number }}--delft-iiif.netlify.app

- name: "Cleanup Netlify folder"
run: |
ls -la ./.netlify || true
rm -rf ./.netlify || true
# This is the actual static site build.
- name: Static site Netlify deploy (preview)
id: netlify_static_site
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy-preview'))
working-directory: apps/static-site
run: |
deploy_json=$(netlify deploy \
deploy_json=$(npx netlify[email protected] deploy \
--build \
--filter=static-site \
--alias=deploy-preview-${{ github.event.number }} \
--json \
--filter=static-site \
--message="Deploy preview from GitHub Actions")
preview_url=$(echo $deploy_json | jq -r '.deploy_url')
echo "preview_url=$preview_url" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
Loading

0 comments on commit c73cfd1

Please sign in to comment.