diff --git a/.github/workflows/bun.yml b/.github/workflows/bun.yml index 3cd0298..d870a36 100644 --- a/.github/workflows/bun.yml +++ b/.github/workflows/bun.yml @@ -7,6 +7,10 @@ on: push: branches: [ "master" ] +env: + DOCKERHUB_SLUG: megghy/vtsuru_live + GHCR_SLUG: ghcr.io/megghy/vtsuru_live + jobs: build: @@ -24,3 +28,33 @@ jobs: run: bun run build - name: 📦 Upload SourceMap run: bunx @hyperdx/cli upload-sourcemaps --serviceKey ${{ secrets.HYPERDX_SERVICE_KEY }} --path dist/assets + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.DOCKERHUB_SLUG }} + ${{ env.GHCR_SLUG }} + + - name: Get current time + uses: josStorer/get-current-time@v2 + id: time + with: + format: YYYYMMDD_HHmmss + utcOffset: "+08:00" + + - name: Build Docker image and push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + ${{ env.GHCR_SLUG }}:latest + ${{ env.GHCR_SLUG }}:${{ steps.time.outputs.formattedTime }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93cd59a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM caddy:alpine + +COPY dist/ /etc/caddy/html/ +COPY src/files/Caddyfile /etc/caddy/ + +EXPOSE 80 \ No newline at end of file diff --git a/src/files/Caddyfile b/src/files/Caddyfile new file mode 100644 index 0000000..9324aab --- /dev/null +++ b/src/files/Caddyfile @@ -0,0 +1,11 @@ +:80 { + # Compress responses according to Accept-Encoding headers + encode gzip zstd + + root * /etc/caddy/html/ + + try_files {path} /index.html + + # Serve everything else from the file system + file_server +} \ No newline at end of file diff --git a/src/router/user.ts b/src/router/user.ts index 43e22bb..2d63710 100644 --- a/src/router/user.ts +++ b/src/router/user.ts @@ -49,6 +49,7 @@ export default [ { path: 'goods', name: 'user-goods', + alias: 'point', component: () => import('@/views/pointViews/PointGoodsView.vue'), meta: { title: '积分兑换', diff --git a/src/views/manage/point/PointManage.vue b/src/views/manage/point/PointManage.vue index b8727cd..025a341 100644 --- a/src/views/manage/point/PointManage.vue +++ b/src/views/manage/point/PointManage.vue @@ -386,8 +386,8 @@ onMounted(() => { }) - - + + 复制 使用国内镜像(访问更快)