Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate app public pages #549

Merged
merged 26 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
df28043
Deprecate app public pages
ja573 Feb 7, 2024
2f6cbbe
Update changelog
ja573 Feb 7, 2024
45e6303
Build and push staging images
ja573 Feb 7, 2024
5e45006
Update changelog
ja573 Feb 7, 2024
2928876
Build and push staging images
ja573 Feb 7, 2024
fec8202
Add event type
ja573 Feb 7, 2024
d2fa6b2
Upgrade docker github actions
ja573 Feb 8, 2024
7bb8115
Update changelog
ja573 Feb 8, 2024
98a93df
Update changelog
ja573 Feb 8, 2024
48f9c85
Merge branch 'develop' into feature/deprecate_website
ja573 Feb 12, 2024
7b3f71a
Upgrade checkout action to v4
ja573 Feb 14, 2024
c6f5627
Update changelog
ja573 Feb 14, 2024
ff0e31e
Upgrade setup-node action to v4
ja573 Feb 14, 2024
4522033
Update changelog
ja573 Feb 14, 2024
308fd90
Merge branch 'develop' into feature/deprecate_website
ja573 Feb 14, 2024
630f51c
Merge branch 'develop' into feature/deprecate_website
ja573 Feb 19, 2024
8a77264
Merge branch 'develop' into feature/deprecate_website
ja573 Feb 27, 2024
4334d85
Merge branch 'develop' into feature/deprecate_website
ja573 Feb 29, 2024
3662332
Change assets path
ja573 Feb 29, 2024
fa83bb9
Remove redundant assets
ja573 Feb 29, 2024
074165d
Deprecate trait
ja573 Feb 29, 2024
98ee45b
Remove redundant assets
ja573 Feb 29, 2024
0b7465b
Remove redundant impot
ja573 Feb 29, 2024
d675259
Merge branch 'develop' into feature/deprecate_website
ja573 Mar 6, 2024
b0dd0b9
Merge branch 'develop' into feature/deprecate_website
ja573 Mar 14, 2024
dd79ec8
Remove actions-rs based actions
ja573 Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/docker_build.yml

This file was deleted.

38 changes: 28 additions & 10 deletions .github/workflows/docker_build_and_push_to_dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: publish-to-dockerhub

on:
release:
types: [published]
pull_request:
workflow_dispatch:

jobs:
build_and_push_docker_image:
build_and_push_staging_docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -19,21 +19,19 @@ jobs:
openbookpublishers/thoth
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr,prefix=staging-pr-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -43,3 +41,23 @@ jobs:
THOTH_EXPORT_API=https://export.thoth.pub
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

build_dev_docker_image:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
id: docker_build
uses: docker/build-push-action@v5
with:
push: false
tags: openbookpublishers/thoth:latest
file: Dockerfile.dev
build-args: |
THOTH_GRAPHQL_API=https://api.thoth.pub
THOTH_EXPORT_API=https://export.thoth.pub
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
45 changes: 45 additions & 0 deletions .github/workflows/docker_build_and_push_to_dockerhub_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: publish-to-dockerhub

on:
release:
types: [published]

jobs:
build_and_push_docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
openbookpublishers/thoth
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
THOTH_GRAPHQL_API=https://api.thoth.pub
THOTH_EXPORT_API=https://export.thoth.pub
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
34 changes: 0 additions & 34 deletions .github/workflows/docker_build_dev.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/docker_build_dev_no_action.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/docker_build_no_action.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- [549](https://github.com/thoth-pub/thoth/pull/549) - Build and push staging docker images on pull requests
- [549](https://github.com/thoth-pub/thoth/pull/549) - Upgrade docker GitHub actions dependencies (`docker/setup-qemu-action@v3`, `docker/setup-buildx-action@v3`, `docker/login-action@v3`, `docker/build-push-action@v5`)

### Removed
- [549](https://github.com/thoth-pub/thoth/pull/549) - Deprecate public-facing pages in Thoth APP in favour of a separate, standalone, website

## [[0.11.15]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.15) - 2024-01-18
### Changed
Expand Down
72 changes: 36 additions & 36 deletions thoth-app-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,42 @@ macro_rules! static_files {
}

static_files! {
(JS, js_file) => ("../static/pkg/thoth_app.js", "/thoth_app.js", "application/javascript"),
(WASM, wasm_file) => ("../static/pkg/thoth_app_bg.wasm", "/thoth_app_bg.wasm", "application/wasm"),
(PKG, pkg_file) => ("../static/pkg/package.json", "/package.json", "application/json"),
(TS1, ts1_file) => ("../static/pkg/thoth_app.d.ts", "/thoth_app.d.ts", "application/typescript"),
(BULMA, bulma_file) => ("../static/css/bulma-pageloader.min.css", "/css/bulma-pageloader.min.css", "text/css; charset=utf-8"),
(CSS, css_file) => ("../static/css/thoth.css", "/css/thoth.css", "text/css; charset=utf-8"),
(LOGO, logo_file) => ("../static/img/thoth-logo.png", "/img/thoth-logo.png", "image/png"),
(BANNER, banner_file) => ("../static/img/thoth-banner.png", "/img/thoth-banner.png", "image/png"),
(COVER, cover_file) => ("../static/img/cover-placeholder.jpg", "/img/cover-placeholder.jpg", "image/jpg"),
(XML, xml_file) => ("../static/browserconfig.xml", "/browserconfig.xml", "application/xml"),
(JSON, json_file) => ("../static/manifest.json", "/manifest.json", "application/json"),
(ICON, icon_file) => ("../static/img/favicon.ico", "/favicon.ico", "image/x-icon"),
(ICON1, icon_file1) => ("../static/img/android-icon-144x144.png", "/android-icon-144x144.png", "image/png"),
(ICON2, icon_file2) => ("../static/img/android-icon-192x192.png", "/android-icon-192x192.png", "image/png"),
(ICON3, icon_file3) => ("../static/img/android-icon-36x36.png", "/android-icon-36x36.png", "image/png"),
(ICON4, icon_file4) => ("../static/img/android-icon-48x48.png", "/android-icon-48x48.png", "image/png"),
(ICON5, icon_file5) => ("../static/img/android-icon-72x72.png", "/android-icon-72x72.png", "image/png"),
(ICON6, icon_file6) => ("../static/img/android-icon-96x96.png", "/android-icon-96x96.png", "image/png"),
(ICON7, icon_file7) => ("../static/img/apple-icon-114x114.png", "/apple-icon-114x114.png", "image/png"),
(ICON8, icon_file8) => ("../static/img/apple-icon-120x120.png", "/apple-icon-120x120.png", "image/png"),
(ICON9, icon_file9) => ("../static/img/apple-icon-144x144.png", "/apple-icon-144x144.png", "image/png"),
(ICON10, icon_file10) => ("../static/img/apple-icon-152x152.png", "/apple-icon-152x152.png", "image/png"),
(ICON11, icon_file11) => ("../static/img/apple-icon-180x180.png", "/apple-icon-180x180.png", "image/png"),
(ICON12, icon_file12) => ("../static/img/apple-icon-57x57.png", "/apple-icon-57x57.png", "image/png"),
(ICON13, icon_file13) => ("../static/img/apple-icon-60x60.png", "/apple-icon-60x60.png", "image/png"),
(ICON14, icon_file14) => ("../static/img/apple-icon-72x72.png", "/apple-icon-72x72.png", "image/png"),
(ICON15, icon_file15) => ("../static/img/apple-icon-76x76.png", "/apple-icon-76x76.png", "image/png"),
(ICON16, icon_file16) => ("../static/img/apple-icon-precomposed.png", "/apple-icon-precomposed.png", "image/png"),
(ICON17, icon_file17) => ("../static/img/apple-icon.png", "/apple-icon.png", "image/png"),
(ICON18, icon_file18) => ("../static/img/favicon-16x16.png", "/favicon-16x16.png", "image/png"),
(ICON19, icon_file19) => ("../static/img/favicon-32x32.png", "/favicon-32x32.png", "image/png"),
(ICON20, icon_file20) => ("../static/img/favicon-96x96.png", "/favicon-96x96.png", "image/png"),
(ICON21, icon_file21) => ("../static/img/ms-icon-144x144.png", "/ms-icon-144x144.png", "image/png"),
(ICON22, icon_file22) => ("../static/img/ms-icon-150x150.png", "/ms-icon-150x150.png", "image/png"),
(ICON23, icon_file23) => ("../static/img/ms-icon-310x310.png", "/ms-icon-310x310.png", "image/png"),
(ICON24, icon_file24) => ("../static/img/ms-icon-70x70.png", "/ms-icon-70x70.png", "image/png"),
(JS, js_file) => ("../static/pkg/thoth_app.js", "/admin/thoth_app.js", "application/javascript"),
(WASM, wasm_file) => ("../static/pkg/thoth_app_bg.wasm", "/admin/thoth_app_bg.wasm", "application/wasm"),
(PKG, pkg_file) => ("../static/pkg/package.json", "/admin/package.json", "application/json"),
(TS1, ts1_file) => ("../static/pkg/thoth_app.d.ts", "/admin/thoth_app.d.ts", "application/typescript"),
(BULMA, bulma_file) => ("../static/css/bulma-pageloader.min.css", "/admin/css/bulma-pageloader.min.css", "text/css; charset=utf-8"),
(CSS, css_file) => ("../static/css/thoth.css", "/admin/css/thoth.css", "text/css; charset=utf-8"),
(LOGO, logo_file) => ("../static/img/thoth-logo.png", "/admin/img/thoth-logo.png", "image/png"),
(BANNER, banner_file) => ("../static/img/thoth-banner.png", "/admin/img/thoth-banner.png", "image/png"),
(COVER, cover_file) => ("../static/img/cover-placeholder.jpg", "/admin/img/cover-placeholder.jpg", "image/jpg"),
(XML, xml_file) => ("../static/browserconfig.xml", "/admin/browserconfig.xml", "application/xml"),
(JSON, json_file) => ("../static/manifest.json", "/admin/manifest.json", "application/json"),
(ICON, icon_file) => ("../static/img/favicon.ico", "/admin/favicon.ico", "image/x-icon"),
(ICON1, icon_file1) => ("../static/img/android-icon-144x144.png", "/admin/android-icon-144x144.png", "image/png"),
(ICON2, icon_file2) => ("../static/img/android-icon-192x192.png", "/admin/android-icon-192x192.png", "image/png"),
(ICON3, icon_file3) => ("../static/img/android-icon-36x36.png", "/admin/android-icon-36x36.png", "image/png"),
(ICON4, icon_file4) => ("../static/img/android-icon-48x48.png", "/admin/android-icon-48x48.png", "image/png"),
(ICON5, icon_file5) => ("../static/img/android-icon-72x72.png", "/admin/android-icon-72x72.png", "image/png"),
(ICON6, icon_file6) => ("../static/img/android-icon-96x96.png", "/admin/android-icon-96x96.png", "image/png"),
(ICON7, icon_file7) => ("../static/img/apple-icon-114x114.png", "/admin/apple-icon-114x114.png", "image/png"),
(ICON8, icon_file8) => ("../static/img/apple-icon-120x120.png", "/admin/apple-icon-120x120.png", "image/png"),
(ICON9, icon_file9) => ("../static/img/apple-icon-144x144.png", "/admin/apple-icon-144x144.png", "image/png"),
(ICON10, icon_file10) => ("../static/img/apple-icon-152x152.png", "/admin/apple-icon-152x152.png", "image/png"),
(ICON11, icon_file11) => ("../static/img/apple-icon-180x180.png", "/admin/apple-icon-180x180.png", "image/png"),
(ICON12, icon_file12) => ("../static/img/apple-icon-57x57.png", "/admin/apple-icon-57x57.png", "image/png"),
(ICON13, icon_file13) => ("../static/img/apple-icon-60x60.png", "/admin/apple-icon-60x60.png", "image/png"),
(ICON14, icon_file14) => ("../static/img/apple-icon-72x72.png", "/admin/apple-icon-72x72.png", "image/png"),
(ICON15, icon_file15) => ("../static/img/apple-icon-76x76.png", "/admin/apple-icon-76x76.png", "image/png"),
(ICON16, icon_file16) => ("../static/img/apple-icon-precomposed.png", "/admin/apple-icon-precomposed.png", "image/png"),
(ICON17, icon_file17) => ("../static/img/apple-icon.png", "/admin/apple-icon.png", "image/png"),
(ICON18, icon_file18) => ("../static/img/favicon-16x16.png", "/admin/favicon-16x16.png", "image/png"),
(ICON19, icon_file19) => ("../static/img/favicon-32x32.png", "/admin/favicon-32x32.png", "image/png"),
(ICON20, icon_file20) => ("../static/img/favicon-96x96.png", "/admin/favicon-96x96.png", "image/png"),
(ICON21, icon_file21) => ("../static/img/ms-icon-144x144.png", "/admin/ms-icon-144x144.png", "image/png"),
(ICON22, icon_file22) => ("../static/img/ms-icon-150x150.png", "/admin/ms-icon-150x150.png", "image/png"),
(ICON23, icon_file23) => ("../static/img/ms-icon-310x310.png", "/admin/ms-icon-310x310.png", "image/png"),
(ICON24, icon_file24) => ("../static/img/ms-icon-70x70.png", "/admin/ms-icon-70x70.png", "image/png"),
}

const INDEX_FILE: &[u8] = include_bytes!("../static/index.html");
Expand Down
2 changes: 1 addition & 1 deletion thoth-app/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffdd57</TileColor></tile></msapplication></browserconfig>
<browserconfig><msapplication><tile><square70x70logo src="/admin/ms-icon-70x70.png"/><square150x150logo src="/admin/ms-icon-150x150.png"/><square310x310logo src="/admin/ms-icon-310x310.png"/><TileColor>#ffdd57</TileColor></tile></msapplication></browserconfig>
23 changes: 23 additions & 0 deletions thoth-app/css/thoth.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,27 @@
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}

.button.primary {
color: #ffffff;
background-color: #8c3f8d;
border-width: 2px;
border-radius: .375rem;
border-color: #8c3f8d;
font-weight: bold;
}
.button.primary:hover {
background-color: #af4fb0;
}
.version {
color: #f14668;
padding-left: 1em;
padding-right: 1em;
padding-bottom: calc(.5em - 1px);
font-weight: bold;
}
.version:hover {
text-decoration: underline;
color: #f14668;
}
34 changes: 17 additions & 17 deletions thoth-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<title>Thoth</title>
<meta name="description" content="Bibliographical metadata management system.">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" sizes="57x57" href="/admin/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/admin/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/admin/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/admin/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/admin/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/admin/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/admin/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/admin/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/admin/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/admin/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/admin/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/admin/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/admin/favicon-16x16.png">
<link rel="manifest" href="/admin/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@creativebulma/bulma-tooltip@1.0.2/dist/bulma-tooltip.min.css">
<link rel="stylesheet" href="/css/bulma-pageloader.min.css">
<link rel="stylesheet" href="/css/thoth.css">
<link rel="stylesheet" href="/admin/css/bulma-pageloader.min.css">
<link rel="stylesheet" href="/admin/css/thoth.css">
<script defer src="https://use.fontawesome.com/releases/v5.4.0/js/all.js"></script>
<script defer src="https://cdn.openbookpublishers.com/js/thoth-analytics.js"></script>
<script src="/thoth_app.js"></script>
<script src="/admin/thoth_app.js"></script>
</head>
<body></body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion thoth-app/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import init, { run_app } from "./pkg/thoth_app.js";

async function main() {
await init("/thoth_app_bg.wasm");
await init("/admin/thoth_app_bg.wasm");
run_app();
}

Expand Down
Loading
Loading