Skip to content

Commit

Permalink
feat: refactor ui (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhunter2333 authored Apr 24, 2024
1 parent 98bc5d4 commit 6827c06
Show file tree
Hide file tree
Showing 10 changed files with 2,993 additions and 2,438 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,48 @@ on:
- "*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- uses: actions/checkout@v4

- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
version: 8
run_install: false

- name: Build Frontend
run: cd frontend && pnpm install --no-frozen-lockfile && pnpm build && cp -r dist ../dist
run: |
cd frontend
pnpm install --no-frozen-lockfile
pnpm build
cp -r dist ../dist
- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/dreamhunter2333/chatgpt-tarot-divination:${{ steps.get_version.outputs.VERSION }}
ghcr.io/dreamhunter2333/chatgpt-tarot-divination:latest
${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ github.repository }}:latest
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ class Config:


settings = Settings()
_logger.info(f"settings: {settings.json()}")
_logger.info(f"settings: {settings.json(indent=2)}")
14 changes: 8 additions & 6 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "chatgpt-tarot-divination",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build --mode prod",
Expand All @@ -10,15 +11,16 @@
"dependencies": {
"@microsoft/fetch-event-source": "^2.0.1",
"@vueuse/core": "^10.9.0",
"markdown-it": "^14.0.0",
"naive-ui": "2.34.3",
"markdown-it": "^14.1.0",
"naive-ui": "2.38.1",
"vooks": "^0.2.12",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
"vue": "^3.4.25",
"vue-router": "^4.3.2"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.5",
"vite-plugin-pwa": "^0.19.2"
"vite": "^5.2.10",
"vite-plugin-pwa": "^0.19.8",
"workbox-window": "^7.1.0"
}
}
Loading

0 comments on commit 6827c06

Please sign in to comment.