first-commit.
Some checks reported errors
continuous-integration/drone Build encountered an error

This commit is contained in:
Ivan Li 2022-07-16 14:29:06 +08:00
parent bf8823b998
commit 032a2285ec
10 changed files with 1593 additions and 1301 deletions

71
.dockerignore Normal file
View File

@ -0,0 +1,71 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
**/node_modules/**
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.*
!.env.example
.cache
**/.cache
public
.idea
.vscode
.DS_Store
secrets.txt

148
.drone.yml Normal file
View File

@ -0,0 +1,148 @@
---
kind: pipeline
name: base
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/gatsby-blog
cache_from:
- docker-registry.ivanli.cc/ivan/gatsby-blog:${DRONE_BRANCH}${DRONE_TAG}-amd64
dockerfile: Dockerfile
build_args:
- BUILDKIT_INLINE_CACHE=1
target: base
tags:
- '${DRONE_COMMIT_SHA:0:8}-amd64'
- '${DRONE_BRANCH}${DRONE_TAG}-amd64'
---
kind: pipeline
name: linux-amd64
type: docker
depends_on:
- base
steps:
- name: build&publish
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/gatsby-blog
dockerfile: Dockerfile
target: release
cache_from:
- docker-registry.ivanli.cc/ivan/gatsby-blog:${DRONE_COMMIT_SHA:0:8}-amd64
tags:
- '${DRONE_COMMIT_SHA:0:8}'
- '${DRONE_BRANCH}${DRONE_TAG}'
- name: notify
image: appleboy/drone-telegram
failure: ignore
when:
status:
- success
- failure
environment:
PLUGIN_TOKEN:
from_secret: drone-telegram-bot-token
PLUGIN_TO:
from_secret: telegram-notify-to
settings:
format: markdown
message: >
{{#success build.status}}
✅ Build #{{build.number}} of `{{repo.name}}` succeeded.
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
```
{{commit.message}}
```
🌐 {{ build.link }}
{{else}}
❌ Build #{{build.number}} of `{{repo.name}}` failed.
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
```
{{commit.message}}
```
🌐 {{ build.link }}
{{/success}}
trigger:
branch:
- master
- main
- develop
---
kind: pipeline
type: docker
name: deploy
clone:
disable: true
depends_on:
- linux-amd64
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: fennec
host:
path: /home/ivan/srv/fennec
steps:
- name: deploy
image: plugins/webhook
settings:
token-value:
from_secret: watchtower-webhook-token
token-type: Bearer
urls: http://101.local/v1/update
content_type: application/json
template: |
{
"owner": "{{ repo.owner }}",
"repo": "{{ repo.name }}",
"status": "{{ build.status }}",
}
- name: notify
image: appleboy/drone-telegram
when:
status:
- success
- failure
failure: ignore
environment:
PLUGIN_TOKEN:
from_secret: drone-telegram-bot-token
PLUGIN_TO:
from_secret: telegram-notify-to
settings:
format: markdown
message: >
{{#success build.status}}
✅ Deploy #{{build.number}} of `{{repo.name}}` succeeded.
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
```
{{commit.message}}
```
🌐 {{ build.link }}
{{else}}
❌ Deploy #{{build.number}} of `{{repo.name}}` failed.
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
```
{{commit.message}}
```
🌐 {{ build.link }}
{{/success}}

4
.gitignore vendored
View File

@ -66,4 +66,6 @@ public
.idea .idea
.vscode .vscode
.DS_Store .DS_Store
secrets.txt

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:16-alpine as base
# RUN apk add --no-cache make gcc g++ python3
WORKDIR /app
COPY package-lock.json package.json ./
RUN npm ci --no-audit --legacy-peer-deps
COPY . .
FROM node:16-alpine as release
WORKDIR /app
COPY --from=base /app ./
RUN npm run build &&\
npm prune --omit dev
EXPOSE 80
CMD npm run serve -- -H 0.0.0.0 -p 80

View File

@ -1,8 +1,12 @@
--- ---
title: About title: Ivan Li
slug: "/about" slug: "/about"
--- ---
你好呀!
Hi! 我是 Ivan Li从事 Web 全栈开发工作,最近在研究电子电路与嵌入式开发。这是我的博客,用来与到访的你分享我的繁星点点。
I'm LekoArts, a designer turned software engineer passionate about open source & teaching. Learn more about Gatsby & React on [my website](https://www.lekoarts.de?utm_source=minimal-blog&utm_medium=Starter). 我平常做 Web 开发一般会使用 React、Angular、Vue、NestJS 相关生态,我偏好 PostgreSQL 存储数据。我喜欢 MacOS 和 ArchLinux。
我正在学习 Rust 语言,它非常棒,我在用 Rust 和 ESP 32-C3 实现一些嵌入式的工程。我还在慢慢摸索电子电路知识,希望我能平安地学到足够用的知识。
哦,对了!因为平常使用 [Logseq](https://notes.ivanli.cc/) 做记录,它相当于我的扩展记忆体,我的很多公开内容都在那儿。不过最后我会找个时间,将内容梳理过来,请放心。

View File

@ -7,14 +7,14 @@ module.exports = {
// You can overwrite values here that are used for the SEO component // You can overwrite values here that are used for the SEO component
// You can also add new values here to query them like usual // You can also add new values here to query them like usual
// See all options: https://github.com/LekoArts/gatsby-themes/blob/main/themes/gatsby-theme-minimal-blog/gatsby-config.js // See all options: https://github.com/LekoArts/gatsby-themes/blob/main/themes/gatsby-theme-minimal-blog/gatsby-config.js
siteTitle: `Minimal Blog`, siteTitle: `Ivan's Blog`,
siteTitleAlt: `Minimal Blog - Gatsby Theme`, siteTitleAlt: `Ivan Li 的个人博客`,
siteHeadline: `Minimal Blog - Gatsby Theme from @lekoarts`, siteHeadline: `Ivan Li 的个人博客`,
siteUrl: `https://minimal-blog.lekoarts.de`, siteUrl: `https://ivanli.cc/`,
siteDescription: `Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and line highlighting.`, siteDescription: `一个 Web 全栈开发者、嵌入式开发爱好者,与你分享我的工作和生活。专注 React、Node.js、Rust热爱 Self-Hosted、IoT、硬件。`,
siteLanguage: `en`, siteLanguage: `zh`,
siteImage: `/banner.jpg`, siteImage: `/banner.jpg`,
author: `@lekoarts_de`, author: `Ivan Li`,
}, },
plugins: [ plugins: [
{ {
@ -31,16 +31,16 @@ module.exports = {
slug: `/about`, slug: `/about`,
}, },
], ],
externalLinks: [ // externalLinks: [
{ // {
name: `Twitter`, // name: `Twitter`,
url: `https://twitter.com/lekoarts_de`, // url: `https://twitter.com/lekoarts_de`,
}, // },
{ // {
name: `Homepage`, // name: `Homepage`,
url: `https://www.lekoarts.de?utm_source=minimal-blog&utm_medium=Starter`, // url: `https://www.lekoarts.de?utm_source=minimal-blog&utm_medium=Starter`,
}, // },
], // ],
}, },
}, },
{ {
@ -62,9 +62,9 @@ module.exports = {
{ {
resolve: `gatsby-plugin-manifest`, resolve: `gatsby-plugin-manifest`,
options: { options: {
name: `minimal-blog - @lekoarts/gatsby-theme-minimal-blog`, name: `Ivan Li 的个人博客`,
short_name: `minimal-blog`, short_name: `Ivan's Blog`,
description: `Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and code highlighting.`, description: `一个 Web 全栈开发者、嵌入式开发爱好者,与你分享我的工作和生活。专注 React、Node.js、Rust热爱 Self-Hosted、IoT、硬件。`,
start_url: `/`, start_url: `/`,
background_color: `#fff`, background_color: `#fff`,
// This will impact how browsers show your PWA/website // This will impact how browsers show your PWA/website

2587
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,14 @@
"scripts": { "scripts": {
"build": "gatsby build", "build": "gatsby build",
"develop": "gatsby develop", "develop": "gatsby develop",
"develop:cypress": "cross-env CYPRESS_SUPPORT=y yarn develop", "develop:cypress": "cross-env CYPRESS_SUPPORT=y npm run develop",
"build:cypress": "cross-env CYPRESS_SUPPORT=y yarn build", "build:cypress": "cross-env CYPRESS_SUPPORT=y npm run build",
"start": "gatsby develop", "start": "gatsby develop",
"serve": "gatsby serve", "serve": "gatsby serve",
"clean": "gatsby clean" "clean": "gatsby clean"
}, },
"dependencies": { "dependencies": {
"@lekoarts/gatsby-theme-minimal-blog": "^4.0.0", "@lekoarts/gatsby-theme-minimal-blog": "^4.1.7",
"gatsby": "^4.18.2", "gatsby": "^4.18.2",
"gatsby-omni-font-loader": "^2.0.0", "gatsby-omni-font-loader": "^2.0.0",
"gatsby-plugin-feed": "^4.18.1", "gatsby-plugin-feed": "^4.18.1",
@ -24,8 +24,8 @@
"gatsby-plugin-manifest": "^4.18.1", "gatsby-plugin-manifest": "^4.18.1",
"gatsby-plugin-sitemap": "^5.18.1", "gatsby-plugin-sitemap": "^5.18.1",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.27", "gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.27",
"react": "^18.0.0", "react": "^18.2.0",
"react-dom": "^18.0.0" "react-dom": "^18.2.0"
}, },
"devDependencies": { "devDependencies": {
"cross-env": "^7.0.3" "cross-env": "^7.0.3"

View File

@ -1,5 +1,10 @@
<Text sx={{ fontSize: [4, 5, 6], fontWeight: `bold`, color: `heading` }}> <Text sx={{ fontSize: [4, 5, 6], fontWeight: `bold`, color: `heading` }}>
Hi. 你好呀!
</Text> </Text>
I'm LekoArts, your theme creator. I'm passionate about open source & teaching. Learn more about Gatsby & React on [my website](https://www.lekoarts.de?utm_source=minimal-blog&utm_medium=Starter). 我是 Ivan Li从事 Web 全栈开发工作,最近在研究电子电路与嵌入式开发。这是我的博客,用来与到访的你分享我的繁星点点。
我平常做 Web 开发一般会使用 React、Angular、Vue、NestJS 相关生态,我偏好 PostgreSQL 存储数据。我喜欢 MacOS 和 ArchLinux。
我正在学习 Rust 语言,它非常棒,我在用 Rust 和 ESP 32-C3 实现一些嵌入式的工程。我还在慢慢摸索电子电路知识,希望我能平安地学到足够用的知识。
哦,对了!因为平常使用 Logseq 做记录,它相当于我的扩展记忆体,我的很多公开内容都在那。不过最后我会找个时间,将内容梳理过来,请放心。

View File

@ -1,3 +1,3 @@
User-agent: * User-agent: *
sitemap: https://minimal-blog.lekoarts.de/sitemap.xml sitemap: https://ivanli.cc/sitemap.xml