Skip to content

Commit 3a54d38

Browse files
committed
feat: redeploy docs -d
1 parent 759aa4c commit 3a54d38

File tree

12 files changed

+235
-183
lines changed

12 files changed

+235
-183
lines changed

.github/workflows/publish.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ jobs:
7474
- name: Install pnpm
7575
uses: pnpm/action-setup@v4
7676
with:
77-
version: 10.2.0
77+
version: 10.6.2
7878

7979
- name: Set Node Version
8080
uses: actions/setup-node@v4
8181
with:
82-
node-version: 23.7.0
82+
node-version: 23.9.0
8383
cache: pnpm
8484

8585
- name: Get pnpm store directory
@@ -112,10 +112,10 @@ jobs:
112112
- uses: actions/checkout@v4
113113
- uses: pnpm/action-setup@v4
114114
with:
115-
version: 10.2.0
115+
version: 10.6.2
116116
- uses: actions/setup-node@v4
117117
with:
118-
node-version: 23.7.0
118+
node-version: 23.9.0
119119
cache: pnpm
120120
- uses: actions/cache@v4
121121
with:
@@ -133,10 +133,10 @@ jobs:
133133
- uses: actions/checkout@v4
134134
- uses: pnpm/action-setup@v4
135135
with:
136-
version: 10.2.0
136+
version: 10.6.2
137137
- uses: actions/setup-node@v4
138138
with:
139-
node-version: 23.7.0
139+
node-version: 23.9.0
140140
cache: pnpm
141141
- uses: actions/cache@v4
142142
with:
@@ -168,10 +168,10 @@ jobs:
168168
- uses: actions/checkout@v4
169169
- uses: pnpm/action-setup@v4
170170
with:
171-
version: 10.2.0
171+
version: 10.6.2
172172
- uses: actions/setup-node@v4
173173
with:
174-
node-version: 23.7.0
174+
node-version: 23.9.0
175175
cache: pnpm
176176
- uses: actions/cache@v4
177177
with:
@@ -209,10 +209,10 @@ jobs:
209209
- uses: actions/checkout@v4
210210
- uses: pnpm/action-setup@v4
211211
with:
212-
version: 10.2.0
212+
version: 10.6.2
213213
- uses: actions/setup-node@v4
214214
with:
215-
node-version: 23.7.0
215+
node-version: 23.9.0
216216
cache: pnpm
217217
- uses: actions/cache@v4
218218
with:
@@ -240,10 +240,10 @@ jobs:
240240
- uses: actions/checkout@v4
241241
- uses: pnpm/action-setup@v4
242242
with:
243-
version: 10.2.0
243+
version: 10.6.2
244244
- uses: actions/setup-node@v4
245245
with:
246-
node-version: 23.7.0
246+
node-version: 23.9.0
247247
cache: pnpm
248248
- uses: actions/cache@v4
249249
with:
@@ -270,10 +270,10 @@ jobs:
270270
- uses: actions/checkout@v4
271271
- uses: pnpm/action-setup@v4
272272
with:
273-
version: 10.2.0
273+
version: 10.6.2
274274
- uses: actions/setup-node@v4
275275
with:
276-
node-version: 23.7.0
276+
node-version: 23.9.0
277277
cache: pnpm
278278
- uses: actions/cache@v4
279279
with:
@@ -302,10 +302,10 @@ jobs:
302302
- uses: actions/checkout@v4
303303
- uses: pnpm/action-setup@v4
304304
with:
305-
version: 10.2.0
305+
version: 10.6.2
306306
- uses: actions/setup-node@v4
307307
with:
308-
node-version: 23.7.0
308+
node-version: 23.9.0
309309
cache: pnpm
310310
- uses: actions/cache@v4
311311
with:
@@ -339,10 +339,10 @@ jobs:
339339
- uses: actions/checkout@v4
340340
- uses: pnpm/action-setup@v4
341341
with:
342-
version: 10.2.0
342+
version: 10.6.2
343343
- uses: actions/setup-node@v4
344344
with:
345-
node-version: 23.7.0
345+
node-version: 23.9.0
346346
cache: pnpm
347347
- uses: actions/cache@v4
348348
with:
@@ -400,11 +400,11 @@ jobs:
400400

401401
- uses: pnpm/action-setup@v4
402402
with:
403-
version: 10.2.0
403+
version: 10.6.2
404404

405405
- uses: actions/setup-node@v4
406406
with:
407-
node-version: 23.7.0
407+
node-version: 23.9.0
408408

409409
- uses: actions/cache@v4
410410
with:
@@ -438,11 +438,11 @@ jobs:
438438

439439
- uses: pnpm/action-setup@v4
440440
with:
441-
version: 10.2.0
441+
version: 10.6.2
442442

443443
- uses: actions/setup-node@v4
444444
with:
445-
node-version: 23.7.0
445+
node-version: 23.9.0
446446

447447
- uses: actions/cache@v4
448448
with:
@@ -476,11 +476,11 @@ jobs:
476476

477477
- uses: pnpm/action-setup@v4
478478
with:
479-
version: 10.2.0
479+
version: 10.6.2
480480

481481
- uses: actions/setup-node@v4
482482
with:
483-
node-version: 23.7.0
483+
node-version: 23.9.0
484484

485485
- uses: actions/cache@v4
486486
with:
@@ -513,10 +513,10 @@ jobs:
513513
- uses: actions/checkout@v4
514514
- uses: pnpm/action-setup@v4
515515
with:
516-
version: 10.2.0
516+
version: 10.6.2
517517
- uses: actions/setup-node@v4
518518
with:
519-
node-version: 23.7.0
519+
node-version: 23.9.0
520520

521521
- name: Configure Git
522522
run: |

.github/workflows/static.yml

+21-12
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ env:
1313

1414
jobs:
1515
build:
16-
if: 'contains(github.event.head_commit.message, ''skip'') == false'
17-
name: Build
16+
name: Build and Deploy Docs
1817
runs-on: ubuntu-latest
1918
steps:
2019
- name: Get The Code
@@ -23,26 +22,36 @@ jobs:
2322
- name: Install pnpm
2423
uses: pnpm/[email protected]
2524
with:
26-
version: 9.3.0
25+
version: 10.6.2
2726

2827
- name: Set Node Version
2928
uses: actions/setup-node@v3
3029
with:
31-
node-version: 22.3.0
30+
node-version: 23.9.0
3231
cache: pnpm
3332

34-
- name: Cache pnpm modules
35-
uses: actions/cache@v3
33+
- name: Get pnpm store directory
34+
id: pnpm-cache
35+
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
36+
37+
- name: Setup pnpm cache
38+
uses: actions/cache@v4
3639
with:
37-
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
38-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
40+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
41+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
3942
restore-keys: |
40-
${{ runner.os }}-pnpm-
43+
${{ runner.os }}-pnpm-store-
4144
4245
- name: Install Dependencies
43-
run: |
44-
pnpm install
45-
pnpm rebuild --recursive
46+
run: pnpm i && pnpm rebuild --recursive
47+
48+
- name: Cache node_modules
49+
uses: actions/cache@v4
50+
with:
51+
path: |
52+
node_modules
53+
*/*/node_modules
54+
key: ${{ runner.os }}-modules-${{ hashFiles('pnpm-lock.yaml') }}
4655

4756
- name: Build Static Assets
4857
run: npm run docs:build

@fiction/admin/dashboard/AuthView.vue

+4-17
Original file line numberDiff line numberDiff line change
@@ -575,26 +575,12 @@ vue.watch(() => itemId.value, () => {
575575
class="w-full"
576576
label="Email"
577577
input="InputEmail"
578-
:input-props="{ autocomplete: 'email', required: true, placeholder: 'Your email address' }"
578+
:input-props="{ autocomplete: 'email', required: true, placeholder: 'Your email' }"
579579
:model-value="fields.email"
580580
ui-size="lg"
581581
@update:model-value="fields.email = $event"
582582
/>
583583

584-
<!-- Name input for register -->
585-
<ElInput
586-
v-if="itemId === 'register'"
587-
key="inputFullName"
588-
data-test-id="input-full-name"
589-
input="InputText"
590-
label="Full name"
591-
class="w-full"
592-
:input-props="{ autocomplete: 'name', required: false, placeholder: 'Your name' }"
593-
ui-size="lg"
594-
:model-value="fields.fullName"
595-
@update:model-value="fields.fullName = $event"
596-
/>
597-
598584
<!-- Password input for login and register -->
599585
<ElInput
600586
v-if="itemId === 'welcome'"
@@ -615,8 +601,9 @@ vue.watch(() => itemId.value, () => {
615601
data-test-id="input-new-password"
616602
input="InputPassword"
617603
label="Password"
604+
sub-label="At least 8 characters"
618605
class="w-full"
619-
:input-props="{ autocomplete: 'new-password', required: true, placeholder: 'Create a password (8+ characters)' }"
606+
:input-props="{ autocomplete: 'new-password', required: true, placeholder: 'Create a password' }"
620607
ui-size="lg"
621608
:model-value="fields.password"
622609
@update:model-value="fields.password = $event"
@@ -631,7 +618,7 @@ vue.watch(() => itemId.value, () => {
631618
input="InputPassword"
632619
label="New password"
633620
class="w-full"
634-
:input-props="{ autocomplete: 'new-password', required: true, placeholder: 'Create a password (8+ characters)' }"
621+
:input-props="{ autocomplete: 'new-password', required: true, placeholder: 'Create a password' }"
635622
ui-size="lg"
636623
/>
637624

@fiction/admin/test/signin.uiux.test.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-irregular-whitespace */
21
import { isCi, shortId } from '@fiction/core'
32
import { createUiTestingKit } from '@fiction/core/test-utils/kit'
43
import { emailActionSnapshot } from '@fiction/plugin-transactions/test/utils'
@@ -74,12 +73,10 @@ describe('authentication flow UI', { retry: isCi() ? 3 : 0 }, async () => {
7473
// Navigate to registration
7574
{ type: 'click', selector: '[data-test-id="to-register"]', waitAfter: 1000 },
7675
{ type: 'visible', selector: '[data-test-id="input-email"]' },
77-
{ type: 'visible', selector: '[data-test-id="input-full-name"]' },
7876
{ type: 'visible', selector: '[data-test-id="input-new-password"]' },
7977

8078
// Fill the registration form
8179
{ type: 'fill', selector: '[data-test-id="input-email"] input[type="email"]', text: testEmail },
82-
{ type: 'fill', selector: '[data-test-id="input-full-name"] input', text: testName },
8380
{ type: 'fill', selector: '[data-test-id="input-new-password"] input', text: testPassword },
8481

8582
// Verify form values
@@ -88,7 +85,6 @@ describe('authentication flow UI', { retry: isCi() ? 3 : 0 }, async () => {
8885
selector: '[data-test-id="form"]',
8986
onValue: (v) => {
9087
expect(v?.email, 'Email input should match filled value').toBe(testEmail)
91-
expect(v?.fullName, 'Name input should match filled value').toBe(testName)
9288
expect(v?.password, 'Password input should match filled value').toBe(testPassword)
9389
},
9490
},

@fiction/cards/posts-magazine/ElMagazineSingle.vue

+13-43
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FictionPosts, Post } from '@fiction/posts'
33
import type { Card } from '@fiction/site'
44
import type { UserConfig } from './index.js'
55
import CardLink from '@fiction/cards/el/CardLink.vue'
6-
import { unhead, useService, vue } from '@fiction/core'
6+
import { dayjs, unhead, useService, vue } from '@fiction/core'
77
import { allPostsLink, postEditLink, postLink, taxonomyLink } from '@fiction/posts'
88
import AnimClipPath from '@fiction/ui/anim/AnimClipPath.vue'
99
import ElSpinner from '@fiction/ui/loaders/ElSpinner.vue'
@@ -38,26 +38,26 @@ const imageAspect = vue.computed(() => {
3838
3939
return w > h ? 'aspect-square max-h-[70dvh]' : 'aspect-[2/1]'
4040
})
41-
const title = () => post?.userConfig.value?.site?.title || post?.title.value || 'Post Not Found'
42-
const description = () => post?.userConfig.value?.site?.description || post?.subTitle.value || 'Post Not Found'
43-
const author = () => post?.authors.value?.map(a => a.fullName).join(', ')
41+
const getTitle = () => post?.userConfig.value?.site?.title || post?.title.value || 'Post Not Found'
42+
const getDescription = () => post?.userConfig.value?.site?.description || post?.subTitle.value || 'Post Not Found'
43+
const getAuthor = () => post?.authors.value?.map(a => a.fullName).join(', ')
4444
const postImage = () => post?.media.value?.url
4545
const postDate = () => post?.dateAt.value
4646
const keywords = () => post?.tags.value?.join(', ')
4747
unhead.useHead({
48-
title,
48+
title: getTitle,
4949
meta: [
50-
{ name: `description`, content: description },
51-
{ name: `author`, content: author },
50+
{ name: `description`, content: getDescription },
51+
{ name: `author`, content: getAuthor },
5252
{ name: `keywords`, content: keywords },
5353
{ name: `robots`, content: `index, follow` },
54-
{ name: `og:title`, content: title },
55-
{ name: `og:description`, content: description },
54+
{ name: `og:title`, content: getTitle },
55+
{ name: `og:description`, content: getDescription },
5656
{ name: `og:type`, content: `article` },
5757
{ name: `og:image`, content: postImage },
5858
{ name: `og:locale`, content: `en_US` },
5959
{ name: `article:published_time`, content: postDate },
60-
{ name: `article:author`, content: author },
60+
{ name: `article:author`, content: getAuthor },
6161
],
6262
})
6363
</script>
@@ -72,38 +72,8 @@ unhead.useHead({
7272
</div>
7373
<article v-if="post">
7474
<div class="space-y-8 text-center max-w-screen-lg mx-auto mb-12">
75-
<div class="tags space-x-4">
76-
<CardButton
77-
size="sm"
78-
:card
79-
design="link"
80-
:href="allPostsLink({ card })"
81-
rounding="full"
82-
icon="i-tabler-arrow-left"
83-
>
84-
All Posts
85-
</CardButton>
86-
<CardButton
87-
v-for="(cat, i) in post.categories.value"
88-
:key="i"
89-
size="sm"
90-
:card
91-
design="outline"
92-
:text="cat"
93-
:href="taxonomyLink({ card, taxonomy: 'category', term: cat })"
94-
/>
95-
<CardButton
96-
v-if="userIsAuthor"
97-
size="sm"
98-
:card
99-
:href="postEditLink({ post })"
100-
class="flex items-center"
101-
design="outline"
102-
icon="i-tabler-edit"
103-
theme="green"
104-
>
105-
Edit Post
106-
</CardButton>
75+
<div v-if="post.publishAt.value" class="tags space-x-4">
76+
{{ dayjs(post.dateAt.value || post.publishAt.value).format('MMMM D, YYYY') }}
10777
</div>
10878
<div class="space-y-4">
10979
<CardTextPost
@@ -118,7 +88,7 @@ unhead.useHead({
11888
path="subTitle"
11989
class="text-lg md:text-2xl xl:text-3xl dark:text-theme-400 text-pretty"
12090
/>
121-
<div class="flex justify-center">
91+
<div class="flex justify-center gap-3">
12292
<ElAuthor v-for="(author, i) in post.authors.value" :key="i" :user="author" :date-at="post.dateAt.value" />
12393
</div>
12494
</div>

0 commit comments

Comments
 (0)