Skip to content

Commit b41b9fc

Browse files
MilesChouclaude
andcommitted
chore: migrate from VuePress 1.x to VitePress
- Remove VuePress configuration and dependencies - Add VitePress configuration with same sidebar structure - Migrate from Travis CI to GitHub Actions - Update Dockerfile to Node.js 22 and port 5173 - Update docker-compose.yml to remove deprecated version field - Remove deprecated files (SUMMARY.md, yarn.lock, .travis.yml) - Update CI badge in README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d69ed74 commit b41b9fc

12 files changed

Lines changed: 2149 additions & 21474 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: npm
27+
28+
- run: npm ci
29+
- run: npm run build
30+
31+
- uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: dist
34+
35+
deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
needs: build
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ Desktop.ini
3030
# Node files
3131
/node_modules
3232

33-
# vuepress dist files
33+
# VitePress dist / cache files
3434
/dist
35+
/.vitepress/cache
3536

3637
# Vagrant files
3738
/.vagrant

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.vitepress/config.mts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: 'Docker Workshop',
5+
description: '手把手帶領大家入門 Docker 世界',
6+
base: '/docker-workshop/',
7+
srcDir: '.',
8+
outDir: 'dist',
9+
10+
themeConfig: {
11+
sidebar: [
12+
{
13+
text: 'Docker Basic Exercises Part 1',
14+
items: [
15+
{ text: 'Hello Docker', link: '/docs/exercises/exercises-01-hello-docker' },
16+
{ text: 'Understand Docker Run', link: '/docs/exercises/exercises-02-understand-docker-run' },
17+
{ text: 'Port forwarding', link: '/docs/exercises/exercises-03-port-forwarding' },
18+
{ text: 'Run Command', link: '/docs/exercises/exercises-04-run-command' },
19+
{ text: 'Volume Mapping', link: '/docs/exercises/exercises-05-volume-mapping' },
20+
{ text: 'Using Docker Instead Install Tools', link: '/docs/exercises/exercises-06-using-docker-instead-install-tools' },
21+
],
22+
},
23+
{
24+
text: 'Docker Basic Exercises Part 2',
25+
items: [
26+
{ text: 'Environment Variable', link: '/docs/exercises/exercises-11-environment-variable' },
27+
{ text: 'Link Container', link: '/docs/exercises/exercises-12-link-container' },
28+
{ text: 'Persistent Image', link: '/docs/exercises/exercises-13-persistent-image' },
29+
{ text: 'Persistent Container filesystem', link: '/docs/exercises/exercises-14-persistent-container-filesystem' },
30+
{ text: 'Volume Advanced', link: '/docs/exercises/exercises-15-volume-advanced' },
31+
{ text: 'Backup Database', link: '/docs/exercises/exercises-16-backup-database' },
32+
],
33+
},
34+
{
35+
text: 'Docker Build Exercises',
36+
items: [
37+
{ text: 'Docker Build', link: '/docs/exercises/exercises-21-docker-build' },
38+
{ text: 'Optimizing Dockerfile', link: '/docs/exercises/exercises-22-optimizing-dockerfile' },
39+
{ text: 'Multi-stage Build', link: '/docs/exercises/exercises-23-multi-stage-build' },
40+
],
41+
},
42+
{
43+
text: 'Docker Compose',
44+
items: [
45+
{ text: 'Docker Compose', link: '/docs/exercises/exercises-31-docker-compose' },
46+
],
47+
},
48+
{ text: '常見指令速查表', link: '/docs/command-tricks' },
49+
],
50+
51+
socialLinks: [
52+
{ icon: 'github', link: 'https://github.com/104corp/docker-workshop' },
53+
],
54+
55+
editLink: {
56+
pattern: 'https://github.com/104corp/docker-workshop/edit/master/:path',
57+
text: '編輯這個頁面',
58+
},
59+
},
60+
})

.vuepress/config.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
FROM node:10
1+
FROM node:22-alpine
22

33
WORKDIR /source
44

5+
COPY package*.json ./
6+
RUN npm install
7+
58
COPY . .
6-
RUN yarn
79

8-
EXPOSE 8080
10+
EXPOSE 5173
911

10-
CMD ["yarn", "dev"]
12+
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Docker Workshop
22

3-
[![Build Status](https://travis-ci.com/104corp/docker-workshop.svg?branch=master)](https://travis-ci.com/104corp/docker-workshop)
3+
[![Deploy to GitHub Pages](https://github.com/104corp/docker-workshop/actions/workflows/deploy.yml/badge.svg)](https://github.com/104corp/docker-workshop/actions/workflows/deploy.yml)
44

55
[Docker](https://www.docker.com/) 工作坊。
66

SUMMARY.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
version: "3"
21
services:
32
web:
43
build: .
54
ports:
6-
- 8080:8080
5+
- 5173:5173
76

87
networks:
98
default:
109
ipam:
1110
config:
12-
- subnet: 172.25.1.0/24
11+
- subnet: 172.25.1.0/24

0 commit comments

Comments
 (0)