Compare commits

..

No commits in common. "7591d486f5e459aeae8f632884e08064866ed639" and "0e44afcbea1ad030abd45b8493ec3cf25c9ec86a" have entirely different histories.

4 changed files with 57 additions and 120 deletions

View File

@ -1,63 +1,7 @@
---
kind: pipeline
name: deps
type: docker
steps:
- name: install
image: plugins/docker
settings:
registry: docker-registry.ivanli.cc
username:
from_secret: ivan-docker-username
password:
from_secret: ivan-docker-password
repo: docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-deps
cache_from:
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-deps:${DRONE_BRANCH}${DRONE_TAG}-amd64
dockerfile: Dockerfile
target: deps
tags:
- '${DRONE_COMMIT_SHA:0:8}-amd64'
- '${DRONE_BRANCH}${DRONE_TAG}-amd64'
- name: notify
image: appleboy/drone-telegram
when:
status:
- failure
failure: ignore
detach: true
environment:
PLUGIN_TOKEN:
from_secret: drone-telegram-bot-token
PLUGIN_TO:
from_secret: telegram-notify-to
settings:
format: markdown
message: >
{{#success build.status}}
✅ Install Deps #{{build.number}} of `{{repo.name}}` succeeded.
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
```
{{commit.message}}
```
🌐 {{ build.link }}
{{else}}
❌ Install Deps #{{build.number}} of `{{repo.name}}` failed.
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
```
{{commit.message}}
```
🌐 {{ build.link }}
{{/success}}
---
kind: pipeline
name: linux-amd64
type: docker
depends_on:
- deps
steps:
- name: build&publish
@ -72,7 +16,7 @@ steps:
dockerfile: Dockerfile
target: release
cache_from:
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-deps:${DRONE_BRANCH}${DRONE_TAG}-amd64
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog:${DRONE_BRANCH}${DRONE_TAG}-amd64
tags:
- '${DRONE_COMMIT_SHA:0:8}'
- '${DRONE_BRANCH}${DRONE_TAG}'

View File

@ -1,22 +1,15 @@
FROM node:16-alpine as base
RUN npm i --location=global pnpm@7
FROM base as deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY pnpm-lock.yaml package.json ./
RUN pnpm i
FROM deps as build
WORKDIR /app
RUN npm i --location=global pnpm@7 &&\
pnpm i
COPY . .
COPY --from=deps /app ./
RUN pnpm build &&\
pnpm prune --prod --config.ignore-scripts=true
FROM node:16-alpine as release
WORKDIR /app
COPY --from=build /app ./
COPY --from=base /app ./
EXPOSE 80
CMD npm run serve -- -p 80

View File

@ -24,7 +24,7 @@
"image-size": "1.0.0",
"js-yaml": "^4.1.0",
"mdx-bundler": "^8.0.0",
"next": "=12.2.0",
"next": "12.2.1",
"next-themes": "^0.0.14",
"postcss": "^8.4.5",
"preact": "^10.6.2",

View File

@ -30,7 +30,7 @@ specifiers:
js-yaml: ^4.1.0
lint-staged: ^11.0.0
mdx-bundler: ^8.0.0
next: '=12.2.0'
next: 12.2.1
next-remote-watch: ^1.0.0
next-themes: ^0.0.14
postcss: ^8.4.5
@ -73,8 +73,8 @@ dependencies:
image-size: 1.0.0
js-yaml: 4.1.0
mdx-bundler: 8.1.0_esbuild@0.13.15
next: 12.2.0_sfoxds7t5ydpegc3knd667wn6m
next-themes: 0.0.14_nsrodebypp3mcf7ihyfjqmpudu
next: 12.2.1_sfoxds7t5ydpegc3knd667wn6m
next-themes: 0.0.14_hd4ftj27eynthkwnbwxec6joby
postcss: 8.4.17
preact: 10.11.1
react: 17.0.2
@ -107,7 +107,7 @@ devDependencies:
cross-env: 7.0.3
dedent: 0.7.0
eslint: 7.32.0
eslint-config-next: 12.0.9_axmrhsq5bdxho664wwmmqxhkji
eslint-config-next: 12.0.9_apni7ptlphdqoi2rt7ovvz6r34
eslint-config-prettier: 8.5.0_eslint@7.32.0
eslint-plugin-prettier: 3.4.1_7gsvg5lgwpfdww3i7smtqxamuy
file-loader: 6.2.0
@ -1570,8 +1570,8 @@ packages:
- utf-8-validate
dev: false
/@next/env/12.2.0:
resolution: {integrity: sha512-/FCkDpL/8SodJEXvx/DYNlOD5ijTtkozf4PPulYPtkPOJaMPpBSOkzmsta4fnrnbdH6eZjbwbiXFdr6gSQCV4w==}
/@next/env/12.2.1:
resolution: {integrity: sha512-lz3TJKIvbdGRUsUr/+h3vy7XvBNGTGzHwhurk5AtqrABj4Zyo70xbshcI7YQTNUK4x9OA/E+SOcXvVx0DHmFRw==}
/@next/eslint-plugin-next/12.0.9:
resolution: {integrity: sha512-Pi7eV7Omt4wkY1UI9Kvv3KQLvAkmWKb5EHePCE1fyR+LeYmKCNYtjVst3QTDkNeULbpPwnDqIISWu+x2y5G9EA==}
@ -1579,104 +1579,104 @@ packages:
glob: 7.1.7
dev: true
/@next/swc-android-arm-eabi/12.2.0:
resolution: {integrity: sha512-hbneH8DNRB2x0Nf5fPCYoL8a0osvdTCe4pvOc9Rv5CpDsoOlf8BWBs2OWpeP0U2BktGvIsuUhmISmdYYGyrvTw==}
/@next/swc-android-arm-eabi/12.2.1:
resolution: {integrity: sha512-Gk7fvo1McA9gues9hixoeoxKnvvUusW0P+fya4ZAU3us+bQm1EqSoDrnOrUsdsgwIPQ3HobOJPY5C3xvKOl/tA==}
engines: {node: '>= 10'}
cpu: [arm]
os: [android]
requiresBuild: true
optional: true
/@next/swc-android-arm64/12.2.0:
resolution: {integrity: sha512-1eEk91JHjczcJomxJ8X0XaUeNcp5Lx1U2Ic7j15ouJ83oRX+3GIslOuabW2oPkSgXbHkThMClhirKpvG98kwZg==}
/@next/swc-android-arm64/12.2.1:
resolution: {integrity: sha512-J+QwWRm2+bOtacZFahoplX3dCYGDpou86VjfcE+M5/E0UCtBmZ6JvItyV4scK8wSKHQQUWq8DmOEm/C0lhsSRQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
requiresBuild: true
optional: true
/@next/swc-darwin-arm64/12.2.0:
resolution: {integrity: sha512-x5U5gJd7ZvrEtTFnBld9O2bUlX8opu7mIQUqRzj7KeWzBwPhrIzTTsQXAiNqsaMuaRPvyHBVW/5d/6g6+89Y8g==}
/@next/swc-darwin-arm64/12.2.1:
resolution: {integrity: sha512-teSfpKHdHQER4FVVCdvS0fHff35Gh4LB2DZ2eNAateIluP2Gnl+tT881MeM4Knvl2Mvm3Z3vtSJNthVoveJnMA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
optional: true
/@next/swc-darwin-x64/12.2.0:
resolution: {integrity: sha512-iwMNFsrAPjfedjKDv9AXPAV16PWIomP3qw/FfPaxkDVRbUls7BNdofBLzkQmqxqWh93WrawLwaqyXpJuAaiwJA==}
/@next/swc-darwin-x64/12.2.1:
resolution: {integrity: sha512-flA1H+9krrINtdWoXBzeESkdIV34OKX0+Lnqd90J1nsERTXntYy6CNOMxMtv1otAcnFy7EHYJQIL8URuu/2XXg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
optional: true
/@next/swc-freebsd-x64/12.2.0:
resolution: {integrity: sha512-gRiAw8g3Akf6niTDLEm1Emfa7jXDjvaAj/crDO8hKASKA4Y1fS4kbi/tyWw5VtoFI4mUzRmCPmZ8eL0tBSG58A==}
/@next/swc-freebsd-x64/12.2.1:
resolution: {integrity: sha512-SkAjp7B7aBxAsRVMZGiAp/qMkh65PLzYuLBTsBSu+4fxFuKF7MAEgaIUhvC8zzD58A+Y9yrY/3813bhtrwkcuA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [freebsd]
requiresBuild: true
optional: true
/@next/swc-linux-arm-gnueabihf/12.2.0:
resolution: {integrity: sha512-/TJZkxaIpeEwnXh6A40trgwd40C5+LJroLUOEQwMOJdavLl62PjCA6dGl1pgooWLCIb5YdBQ0EG4ylzvLwS2+Q==}
/@next/swc-linux-arm-gnueabihf/12.2.1:
resolution: {integrity: sha512-V7ov2LXrLWuYVH/syzrzpmwWumg5rCh0siwOPNCRzVkrpgP8WoIRNdeZ/NQIj0ng+kq7gDF1jib583Lk0wbDeQ==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-arm64-gnu/12.2.0:
resolution: {integrity: sha512-++WAB4ElXCSOKG9H8r4ENF8EaV+w0QkrpjehmryFkQXmt5juVXz+nKDVlCRMwJU7A1O0Mie82XyEoOrf6Np1pA==}
/@next/swc-linux-arm64-gnu/12.2.1:
resolution: {integrity: sha512-HlnDQD3r4YqCj2gu6uo86oEM0ixBsyKLaPcZcGwWAD5mFG5R4zzTZG7BO2wJkGWmkzijHluE14dlTmfzc8jdEQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-arm64-musl/12.2.0:
resolution: {integrity: sha512-XrqkHi/VglEn5zs2CYK6ofJGQySrd+Lr4YdmfJ7IhsCnMKkQY1ma9Hv5THwhZVof3e+6oFHrQ9bWrw9K4WTjFA==}
/@next/swc-linux-arm64-musl/12.2.1:
resolution: {integrity: sha512-P8AkWd4RHbuF24ol3jk2akXpntcDI0gv5uD7eMpAOXb8W2A6y/sv0tKNSGUV3efSutOyu23jNn2EiTNxHgU4NQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-x64-gnu/12.2.0:
resolution: {integrity: sha512-MyhHbAKVjpn065WzRbqpLu2krj4kHLi6RITQdD1ee+uxq9r2yg5Qe02l24NxKW+1/lkmpusl4Y5Lks7rBiJn4w==}
/@next/swc-linux-x64-gnu/12.2.1:
resolution: {integrity: sha512-ZbsM+rIMqK6xi3lovspzPJoIPre3LglKrCXKLkln7rD0uiymzfLhS2VCj8u4qRynz22iAzuI4mJNpZa3AsJFrA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-linux-x64-musl/12.2.0:
resolution: {integrity: sha512-Tz1tJZ5egE0S/UqCd5V6ZPJsdSzv/8aa7FkwFmIJ9neLS8/00za+OY5pq470iZQbPrkTwpKzmfTTIPRVD5iqDg==}
/@next/swc-linux-x64-musl/12.2.1:
resolution: {integrity: sha512-JeATguMe37bviPwkIUjO7T3kcefMBQwJFLhkFTaJYGmPm12EsW1FtKcg87AI87xdGvfrHQKlM3phNaG/dkneTQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
optional: true
/@next/swc-win32-arm64-msvc/12.2.0:
resolution: {integrity: sha512-0iRO/CPMCdCYUzuH6wXLnsfJX1ykBX4emOOvH0qIgtiZM0nVYbF8lkEyY2ph4XcsurpinS+ziWuYCXVqrOSqiw==}
/@next/swc-win32-arm64-msvc/12.2.1:
resolution: {integrity: sha512-8dal/MdrVshDKYBtloJw/RhJx140KUoRRYoRfpJ9oAdP8UXBdR0haKfg5EdOy98t8Q76apArxPsK7DfwoR1f3w==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
optional: true
/@next/swc-win32-ia32-msvc/12.2.0:
resolution: {integrity: sha512-8A26RJVcJHwIKm8xo/qk2ePRquJ6WCI2keV2qOW/Qm+ZXrPXHMIWPYABae/nKN243YFBNyPiHytjX37VrcpUhg==}
/@next/swc-win32-ia32-msvc/12.2.1:
resolution: {integrity: sha512-uSAoOBpCp4oxVD9gTY1f27hr9xNLEOCglxZPH1+FonHpM5n9Sp4H01uQHWE/Y26iHmJeUJAWxtRxEYylnO4U9A==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
optional: true
/@next/swc-win32-x64-msvc/12.2.0:
resolution: {integrity: sha512-OI14ozFLThEV3ey6jE47zrzSTV/6eIMsvbwozo+XfdWqOPwQ7X00YkRx4GVMKMC0rM44oGS2gmwMKYpe4EblnA==}
/@next/swc-win32-x64-msvc/12.2.1:
resolution: {integrity: sha512-gx4aLMAZAVjtShiCrUSszoxnzBWJWf09Lkey6mcc0jFZjbz4xkyDbp53V229DtOYTUL4t0IZJ0I7+ftQ5CYIjg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@ -3504,7 +3504,7 @@ packages:
engines: {node: '>=12'}
dev: false
/eslint-config-next/12.0.9_axmrhsq5bdxho664wwmmqxhkji:
/eslint-config-next/12.0.9_apni7ptlphdqoi2rt7ovvz6r34:
resolution: {integrity: sha512-mhpFUsdctLw9PPOVF6S45n7uEzeRth9Xub6CbsKG8Bmr4QFTs1vhbFjp3cjdFIxjMQNuY8hcu66XFlvBB768Iw==}
peerDependencies:
eslint: ^7.23.0 || ^8.0.0
@ -3524,7 +3524,7 @@ packages:
eslint-plugin-jsx-a11y: 6.6.1_eslint@7.32.0
eslint-plugin-react: 7.31.8_eslint@7.32.0
eslint-plugin-react-hooks: 4.6.0_eslint@7.32.0
next: 12.2.0_sfoxds7t5ydpegc3knd667wn6m
next: 12.2.1_sfoxds7t5ydpegc3knd667wn6m
typescript: 4.8.4
transitivePeerDependencies:
- eslint-import-resolver-webpack
@ -5748,20 +5748,20 @@ packages:
- supports-color
dev: true
/next-themes/0.0.14_nsrodebypp3mcf7ihyfjqmpudu:
/next-themes/0.0.14_hd4ftj27eynthkwnbwxec6joby:
resolution: {integrity: sha512-x09OaM+wg3SIlEjOv8B21aw/E36jxTtfW3Dm/DPwMsSMluGt7twe1LigA6nc+mXP1u0qu9MxBaIrPPH6UTiKnA==}
peerDependencies:
next: '*'
react: '*'
react-dom: '*'
dependencies:
next: 12.2.0_sfoxds7t5ydpegc3knd667wn6m
next: 12.2.1_sfoxds7t5ydpegc3knd667wn6m
react: 17.0.2
react-dom: 17.0.2_react@17.0.2
dev: false
/next/12.2.0_sfoxds7t5ydpegc3knd667wn6m:
resolution: {integrity: sha512-B4j7D3SHYopLYx6/Ark0fenwIar9tEaZZFAaxmKjgcMMexhVJzB3jt7X+6wcdXPPMeUD6r09weUtnDpjox/vIA==}
/next/12.2.1_sfoxds7t5ydpegc3knd667wn6m:
resolution: {integrity: sha512-090KB5CZRlLG/GWxb8tA1ZFwqL8OfpUtH4mXA7POuisa6NL5ihiAZhfk5nRBdPHvkXuSt0n7zQaVym6SrT3Wiw==}
engines: {node: '>=12.22.0'}
hasBin: true
peerDependencies:
@ -5778,7 +5778,7 @@ packages:
sass:
optional: true
dependencies:
'@next/env': 12.2.0
'@next/env': 12.2.1
'@swc/helpers': 0.4.2
caniuse-lite: 1.0.30001418
postcss: 8.4.5
@ -5787,19 +5787,19 @@ packages:
styled-jsx: 5.0.2_react@17.0.2
use-sync-external-store: 1.1.0_react@17.0.2
optionalDependencies:
'@next/swc-android-arm-eabi': 12.2.0
'@next/swc-android-arm64': 12.2.0
'@next/swc-darwin-arm64': 12.2.0
'@next/swc-darwin-x64': 12.2.0
'@next/swc-freebsd-x64': 12.2.0
'@next/swc-linux-arm-gnueabihf': 12.2.0
'@next/swc-linux-arm64-gnu': 12.2.0
'@next/swc-linux-arm64-musl': 12.2.0
'@next/swc-linux-x64-gnu': 12.2.0
'@next/swc-linux-x64-musl': 12.2.0
'@next/swc-win32-arm64-msvc': 12.2.0
'@next/swc-win32-ia32-msvc': 12.2.0
'@next/swc-win32-x64-msvc': 12.2.0
'@next/swc-android-arm-eabi': 12.2.1
'@next/swc-android-arm64': 12.2.1
'@next/swc-darwin-arm64': 12.2.1
'@next/swc-darwin-x64': 12.2.1
'@next/swc-freebsd-x64': 12.2.1
'@next/swc-linux-arm-gnueabihf': 12.2.1
'@next/swc-linux-arm64-gnu': 12.2.1
'@next/swc-linux-arm64-musl': 12.2.1
'@next/swc-linux-x64-gnu': 12.2.1
'@next/swc-linux-x64-musl': 12.2.1
'@next/swc-win32-arm64-msvc': 12.2.1
'@next/swc-win32-ia32-msvc': 12.2.1
'@next/swc-win32-x64-msvc': 12.2.1
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros