Skip to content

Commit

Permalink
Merge pull request #46 from LHRUN/dev
Browse files Browse the repository at this point in the history
Feature/1.5.1
  • Loading branch information
LHRUN authored Nov 2, 2024
2 parents eb62221 + 1a77429 commit 64c45d8
Show file tree
Hide file tree
Showing 12 changed files with 1,948 additions and 107 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: deploy gh-page
name: Deploy to GitHub Page
on:
push:
branches: [main]
jobs:
build:
name: build and deploy gh-page
name: build and deploy
env:
COMMIT_SECRET: ${{secrets.COMMIT_SECRET}}
USER_NAME: songlh
Expand All @@ -13,29 +13,28 @@ jobs:
GITHUB_REPOSITORY: paint-board
runs-on: ubuntu-latest
steps:
- name: checkout repository main branch
uses: actions/checkout@main
- name: with node.js
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: npm install
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: |
npm install -g pnpm
pnpm install
- name: npm run build
docker build --target build-stage -t paint-board .
- name: Copy build output
run: |
pnpm build
- name: commit files
container_id=$(docker create paint-board)
docker cp $container_id:${PUBLISH_DIR} ./dist
docker rm $container_id
- name: Deploy to GitHub Pages
run: |
cd $PUBLISH_DIR
cd ./dist
git init
git config --local user.name $USER_NAME
git config --local user.email $USER_EMAIL
git status
git remote add origin https://$COMMIT_SECRET@github.com/$GITHUB_REPOSITORY.git
git checkout -b gh-pages
git add --all
git commit -m "deploy to github pages"
git push origin gh-pages -f
echo deploy gh-pages complete
git commit -m "Deploy to GitHub Pages"
git push --force https://$COMMIT_SECRET@github.com/$GITHUB_REPOSITORY.git main:gh-pages
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 1.5.1

### Feat

- add PWA

### CI

- integrate Dockerfile with GitHub Actions for GitHub Pages deployment

# 1.5.0

### Feat
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine as build-stage
FROM node:18-alpine as build-stage
LABEL maintainer="Leo 'song.lhlh@gmail.com'"

WORKDIR /app
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)
- Support multiple canvas switching, each canvas can be customized title, add, delete, and provide upload and download.
+ i18n
- Currently support English, Chinese language display.
+ PWA support, offline access

## Future Plans
+ Multi-platform authentication login and data synchronization
Expand Down
1 change: 1 addition & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Link: [https://songlh.top/paint-board/](https://songlh.top/paint-board/)
- 支持多个画布切换,每个画布可自定义标题、增加、删除,并提供上传和下载功能。
+ 国际化
- 目前支持中文,英文两种语言展示。
+ 支持 PWA, 可离线访问

## 未来计划
+ 多平台认证登录,数据同步。
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "paint-board",
"private": true,
"version": "1.5.0",
"version": "1.5.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -60,6 +60,7 @@
"typescript": "^4.9.4",
"vite": "^3.2.5",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-pwa": "0.16.7",
"vite-plugin-svgr": "^4.2.0"
},
"lint-staged": {
Expand Down
Loading

0 comments on commit 64c45d8

Please # to comment.