~repos /only-bible-app
git clone https://pyrossh.dev/repos/only-bible-app.git
The only bible app you will ever need. No ads. No in-app purchases. No distractions.
7c0cd679
—
pyrossh 1 year ago
add pages deploy
- .github/workflows/build.yml +30 -1
- website/src/routes/+error.svelte +24 -0
- website/svelte.config.js +6 -6
.github/workflows/build.yml
CHANGED
|
@@ -23,4 +23,33 @@ jobs:
|
|
|
23
23
|
cache: true
|
|
24
24
|
- run: echo -e "TTS_SUBSCRIPTION_KEY=${{ secrets.TTS_SUBSCRIPTION_KEY }}\nRESEND_API_KEY=${{ secrets.RESEND_API_KEY }}" > .env
|
|
25
25
|
- run: flutter build appbundle --debug --dart-define-from-file=.env
|
|
26
|
-
- run: flutter build ios --release --no-codesign --dart-define-from-file=.env
|
|
26
|
+
- run: flutter build ios --release --no-codesign --dart-define-from-file=.env
|
|
27
|
+
|
|
28
|
+
website-build:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: actions/configure-pages@v4
|
|
33
|
+
- uses: actions/setup-node@v4
|
|
34
|
+
with:
|
|
35
|
+
node-version: 20
|
|
36
|
+
cache: npm
|
|
37
|
+
- run: npm ci
|
|
38
|
+
- run: npm run build
|
|
39
|
+
- uses: actions/upload-pages-artifact@v3
|
|
40
|
+
with:
|
|
41
|
+
path: 'build/'
|
|
42
|
+
|
|
43
|
+
website-deploy:
|
|
44
|
+
needs: website-build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
permissions:
|
|
47
|
+
pages: write
|
|
48
|
+
id-token: write
|
|
49
|
+
environment:
|
|
50
|
+
name: github-pages
|
|
51
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
52
|
+
steps:
|
|
53
|
+
- name: Deploy
|
|
54
|
+
id: deployment
|
|
55
|
+
uses: actions/deploy-pages@v4
|
website/src/routes/+error.svelte
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { base } from '$app/paths';
|
|
3
|
+
import { page } from '$app/stores';
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<svelte:head>
|
|
7
|
+
<title>{$page.error?.message} | Only Bible App</title>
|
|
8
|
+
</svelte:head>
|
|
9
|
+
|
|
10
|
+
<main id="content" class="prose">
|
|
11
|
+
<div class="max-w-[50rem] mx-auto px-4 sm:px-6 lg:px-8">
|
|
12
|
+
<div class="flex flex-col">
|
|
13
|
+
<h1 class="text-4xl font-bold">{$page.status} - {$page.error?.message}</h1>
|
|
14
|
+
<p class="my-4">
|
|
15
|
+
{#if $page.status === 404}
|
|
16
|
+
The page you were looking for doesn't exist.
|
|
17
|
+
{:else}
|
|
18
|
+
Something went wrong. Please try again later.
|
|
19
|
+
{/if}
|
|
20
|
+
</p>
|
|
21
|
+
<a href="{base}/" class="underline mt-4"> Go back home </a>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</main>
|
website/svelte.config.js
CHANGED
|
@@ -2,12 +2,12 @@ import adapter from '@sveltejs/adapter-auto';
|
|
|
2
2
|
|
|
3
3
|
/** @type {import('@sveltejs/kit').Config} */
|
|
4
4
|
const config = {
|
|
5
|
-
|
|
5
|
+
kit: {
|
|
6
|
-
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
|
7
|
-
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
|
8
|
-
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
|
9
|
-
|
|
6
|
+
adapter: adapter({
|
|
7
|
+
strict: true,
|
|
8
|
+
fallback: '404.html'
|
|
9
|
+
})
|
|
10
|
-
|
|
10
|
+
}
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export default config;
|