From c4269dc0b92bed16895b427491caf4d7147fc69b Mon Sep 17 00:00:00 2001 From: xy <10816187@qq.com> Date: Tue, 18 Nov 2025 22:12:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astro.config.mjs | 13 ++- package.json | 4 + pnpm-lock.yaml | 149 ++++++++++++++++++++++++++++++++ scripts/Dockerfile | 21 +++++ scripts/deploy.sh | 34 ++++---- src/components/BaseFooter.astro | 1 + src/components/BaseHeader.astro | 2 + src/components/Demo.tsx | 1 - src/pages/index.astro | 30 ++++++- src/pages/posts/[...slug].astro | 9 ++ 10 files changed, 239 insertions(+), 25 deletions(-) create mode 100644 scripts/Dockerfile create mode 100644 src/pages/posts/[...slug].astro diff --git a/astro.config.mjs b/astro.config.mjs index 8416d19..c8ae5b8 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,8 +5,15 @@ import solidJs from '@astrojs/solid-js'; import sitemap from '@astrojs/sitemap'; +import node from '@astrojs/node'; + // https://astro.build/config export default defineConfig({ - site: 'https://ua42.com', - integrations: [solidJs(), sitemap()] -}); + site: 'https://ua42.com', + output: 'server', + integrations: [solidJs(), sitemap()], + + adapter: node({ + mode: 'standalone' + }) +}); \ No newline at end of file diff --git a/package.json b/package.json index 588faf5..2e2b02c 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,14 @@ "deploy": "./scripts/deploy.sh" }, "dependencies": { + "@astrojs/node": "^9.5.1", "@astrojs/sitemap": "^3.6.0", "@astrojs/solid-js": "^5.1.3", "astro": "^5.15.8", "modern-normalize": "^3.0.1", "solid-js": "^1.9.10" + }, + "volta": { + "node": "22.21.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2433744..6ab0d11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@astrojs/node': + specifier: ^9.5.1 + version: 9.5.1(astro@5.15.8(@types/node@24.10.1)(rollup@4.53.2)(typescript@5.9.3)) '@astrojs/sitemap': specifier: ^3.6.0 version: 3.6.0 @@ -32,9 +35,17 @@ packages: '@astrojs/internal-helpers@0.7.4': resolution: {integrity: sha512-lDA9MqE8WGi7T/t2BMi+EAXhs4Vcvr94Gqx3q15cFEz8oFZMO4/SFBqYr/UcmNlvW+35alowkVj+w9VhLvs5Cw==} + '@astrojs/internal-helpers@0.7.5': + resolution: {integrity: sha512-vreGnYSSKhAjFJCWAwe/CNhONvoc5lokxtRoZims+0wa3KbHBdPHSSthJsKxPd8d/aic6lWKpRTYGY/hsgK6EA==} + '@astrojs/markdown-remark@6.3.8': resolution: {integrity: sha512-uFNyFWadnULWK2cOw4n0hLKeu+xaVWeuECdP10cQ3K2fkybtTlhb7J7TcScdjmS8Yps7oje9S/ehYMfZrhrgCg==} + '@astrojs/node@9.5.1': + resolution: {integrity: sha512-7k+SU877OUQylPr0mFcWrGvNuC78Lp9w+GInY8Rwc+LkHyDP9xls+nZAioK0WDWd+fyeQnlHbpDGURO3ZHuDVg==} + peerDependencies: + astro: ^5.14.3 + '@astrojs/prism@3.3.0': resolution: {integrity: sha512-q8VwfU/fDZNoDOf+r7jUnMC2//H2l0TuQ6FkGJL8vD8nw/q5KiL3DS1KKBI3QhI9UQhpJ5dc7AtqfbXWuOgLCQ==} engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0} @@ -821,6 +832,10 @@ packages: defu@6.1.4: resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -856,6 +871,9 @@ packages: resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + electron-to-chromium@1.5.254: resolution: {integrity: sha512-DcUsWpVhv9svsKRxnSCZ86SjD+sp32SGidNB37KpqXJncp1mfUgKbHvBomE89WJDbfVKw1mdv5+ikrvd43r+Bg==} @@ -865,6 +883,10 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + entities@6.0.1: resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} engines: {node: '>=0.12'} @@ -881,6 +903,9 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} @@ -891,6 +916,10 @@ packages: estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} @@ -919,6 +948,10 @@ packages: fontkit@2.0.4: resolution: {integrity: sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g==} + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -980,9 +1013,16 @@ packages: http-cache-semantics@4.2.0: resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} + http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + iron-webcrypto@1.2.1: resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} @@ -1181,6 +1221,14 @@ packages: micromark@4.0.2: resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@3.0.1: + resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} + engines: {node: '>= 0.6'} + modern-normalize@3.0.1: resolution: {integrity: sha512-VqlMdYi59Uch6fnUPxnpijWUQe+TW6zeWCvyr6Mb7JibheHzSuAAoJi2c71ZwIaWKpECpGpYHoaaBp6rBRr+/g==} engines: {node: '>=6'} @@ -1223,6 +1271,10 @@ packages: ohash@2.0.11: resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + oniguruma-parser@0.12.1: resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==} @@ -1285,6 +1337,10 @@ packages: radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} + range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + readdirp@4.1.2: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} @@ -1358,6 +1414,10 @@ packages: engines: {node: '>=10'} hasBin: true + send@1.2.0: + resolution: {integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==} + engines: {node: '>= 18'} + seroval-plugins@1.3.3: resolution: {integrity: sha512-16OL3NnUBw8JG1jBLUoZJsLnQq0n5Ua6aHalhJK4fMQkz1lqR7Osz1sA30trBtd9VUDc2NgkuRCn8+/pBwqZ+w==} engines: {node: '>=10'} @@ -1368,6 +1428,12 @@ packages: resolution: {integrity: sha512-RbcPH1n5cfwKrru7v7+zrZvjLurgHhGyso3HTyGtRivGWgYjbOmGuivCQaORNELjNONoK35nj28EoWul9sb1zQ==} engines: {node: '>=10'} + server-destroy@1.0.1: + resolution: {integrity: sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + sharp@0.34.5: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -1402,6 +1468,14 @@ packages: space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} @@ -1435,6 +1509,10 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -1709,6 +1787,8 @@ snapshots: '@astrojs/internal-helpers@0.7.4': {} + '@astrojs/internal-helpers@0.7.5': {} + '@astrojs/markdown-remark@6.3.8': dependencies: '@astrojs/internal-helpers': 0.7.4 @@ -1735,6 +1815,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@astrojs/node@9.5.1(astro@5.15.8(@types/node@24.10.1)(rollup@4.53.2)(typescript@5.9.3))': + dependencies: + '@astrojs/internal-helpers': 0.7.5 + astro: 5.15.8(@types/node@24.10.1)(rollup@4.53.2)(typescript@5.9.3) + send: 1.2.0 + server-destroy: 1.0.1 + transitivePeerDependencies: + - supports-color + '@astrojs/prism@3.3.0': dependencies: prismjs: 1.30.0 @@ -2497,6 +2586,8 @@ snapshots: defu@6.1.4: {} + depd@2.0.0: {} + dequal@2.0.3: {} destr@2.0.5: {} @@ -2522,12 +2613,16 @@ snapshots: dset@3.1.4: {} + ee-first@1.1.1: {} + electron-to-chromium@1.5.254: {} emoji-regex@10.6.0: {} emoji-regex@8.0.0: {} + encodeurl@2.0.0: {} + entities@6.0.1: {} es-module-lexer@1.7.0: {} @@ -2563,6 +2658,8 @@ snapshots: escalade@3.2.0: {} + escape-html@1.0.3: {} + escape-string-regexp@5.0.0: {} estree-walker@2.0.2: {} @@ -2571,6 +2668,8 @@ snapshots: dependencies: '@types/estree': 1.0.8 + etag@1.8.1: {} + eventemitter3@5.0.1: {} extend@3.0.2: {} @@ -2600,6 +2699,8 @@ snapshots: unicode-properties: 1.4.1 unicode-trie: 2.0.0 + fresh@2.0.0: {} + fsevents@2.3.3: optional: true @@ -2716,8 +2817,18 @@ snapshots: http-cache-semantics@4.2.0: {} + http-errors@2.0.0: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + import-meta-resolve@4.2.0: {} + inherits@2.0.4: {} + iron-webcrypto@1.2.1: {} is-docker@3.0.0: {} @@ -3085,6 +3196,12 @@ snapshots: transitivePeerDependencies: - supports-color + mime-db@1.54.0: {} + + mime-types@3.0.1: + dependencies: + mime-db: 1.54.0 + modern-normalize@3.0.1: {} mrmime@2.0.1: {} @@ -3115,6 +3232,10 @@ snapshots: ohash@2.0.11: {} + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + oniguruma-parser@0.12.1: {} oniguruma-to-es@4.3.3: @@ -3176,6 +3297,8 @@ snapshots: radix3@1.1.2: {} + range-parser@1.2.1: {} + readdirp@4.1.2: {} regex-recursion@6.0.2: @@ -3315,12 +3438,32 @@ snapshots: semver@7.7.3: {} + send@1.2.0: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.0 + mime-types: 3.0.1 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + seroval-plugins@1.3.3(seroval@1.3.2): dependencies: seroval: 1.3.2 seroval@1.3.2: {} + server-destroy@1.0.1: {} + + setprototypeof@1.2.0: {} + sharp@0.34.5: dependencies: '@img/colour': 1.0.0 @@ -3394,6 +3537,10 @@ snapshots: space-separated-tokens@2.0.2: {} + statuses@2.0.1: {} + + statuses@2.0.2: {} + stream-replace-string@2.0.0: {} string-width@4.2.3: @@ -3430,6 +3577,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 + toidentifier@1.0.1: {} + trim-lines@3.0.1: {} trough@2.2.0: {} diff --git a/scripts/Dockerfile b/scripts/Dockerfile new file mode 100644 index 0000000..6263ef7 --- /dev/null +++ b/scripts/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:3.22 AS base +WORKDIR /app + +RUN apk add --no-cache --update nodejs pnpm + +FROM base AS install +ENV NODE_ENV=production +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install + +FROM install AS build +COPY . . +RUN pnpm build + +FROM base +COPY --from=install /app/node_modules ./node_modules +COPY --from=build /app/dist ./dist +ENV HOST=0.0.0.0 +ENV PORT=4321 +EXPOSE 4321 +CMD ["node", "./dist/server/entry.mjs"] diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 7acb5eb..b9467a2 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,30 +1,28 @@ #!/bin/bash -# 严格模式 set -euo pipefail PROJECT_ROOT=$(cd -- "$(dirname "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd) -REMOTE_SERVER="02" -REMOTE_DIR="/srv/docker/nginx/www/blog" +DOCKERFILE_PATH=./scripts/Dockerfile +IMAGE_NAME=blog +IMAGE_FILE_NAME=$IMAGE_NAME.tar.gz +REMOTE_SERVER=02 +REMOTE_PATH=/srv/docker/nginx/www +DOCKER_NETWORK=docker_app-bridge -cd "${PROJECT_ROOT}" +cd "$PROJECT_ROOT" -pnpm run build +docker build -f $DOCKERFILE_PATH --platform linux/amd64 -t $IMAGE_NAME . -tar -czf dist.tar.gz ./dist >/dev/null 2>&1 +docker save $IMAGE_NAME | gzip > $IMAGE_FILE_NAME -scp dist.tar.gz "${REMOTE_SERVER}:${REMOTE_DIR}" - -ssh "$REMOTE_SERVER" bash -s -- "${REMOTE_DIR}" << 'EOF' - REMOTE_DIR="$1" +scp $IMAGE_FILE_NAME $REMOTE_SERVER:$REMOTE_PATH +ssh $REMOTE_SERVER bash << EOF set -euo pipefail - - cd "${REMOTE_DIR}" - rm -rf dist - tar -xzf dist.tar.gz - rm dist.tar.gz + cd $REMOTE_PATH + docker load -i $IMAGE_FILE_NAME + docker rm -f $IMAGE_NAME || true + docker run -d --name $IMAGE_NAME --network $DOCKER_NETWORK $IMAGE_NAME EOF -rm -rf dist -rm -f dist.tar.gz -echo "部署完成" +rm -f $IMAGE_FILE_NAME diff --git a/src/components/BaseFooter.astro b/src/components/BaseFooter.astro index f0fa4f4..484f69e 100644 --- a/src/components/BaseFooter.astro +++ b/src/components/BaseFooter.astro @@ -3,6 +3,7 @@ background-color: #1a1a1a; height: 70px; overflow: hidden; + flex-shrink: 0; } .content { diff --git a/src/components/BaseHeader.astro b/src/components/BaseHeader.astro index 198a5bd..6688727 100644 --- a/src/components/BaseHeader.astro +++ b/src/components/BaseHeader.astro @@ -5,6 +5,8 @@ top: 0; z-index: 99999; box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px; + flex-shrink: 0; + background: #fff; } .main-nav { diff --git a/src/components/Demo.tsx b/src/components/Demo.tsx index 34718e3..ff0e1ad 100644 --- a/src/components/Demo.tsx +++ b/src/components/Demo.tsx @@ -1,4 +1,3 @@ - export default function HelloWorld() { return
{post.date}
+{post.summary}
+ + )) + } +