Skip to content

Commit 98b7f07

Browse files
committed
feat: Support docker.
1 parent f7306c2 commit 98b7f07

File tree

4 files changed

+79
-32
lines changed

4 files changed

+79
-32
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,23 @@ jobs:
6161
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/html-tutorial/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
6262
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
6363
64-
${{ steps.changelog.outputs.changelog }}
64+
${{ steps.changelog.outputs.changelog }}
65+
```
66+
67+
# Create Docker Image
68+
- name: Docker login
69+
if: steps.create_tag.outputs.successful
70+
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
71+
72+
- name: Build docs image
73+
if: steps.create_tag.outputs.successful
74+
run: docker image build -t html-tutorial .
75+
76+
- name: Tags & Push image
77+
if: steps.create_tag.outputs.successful
78+
run: |
79+
echo "outputs.tag - ${{ steps.changelog.outputs.version }}"
80+
docker tag html-tutorial ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}}
81+
docker tag html-tutorial ${{ secrets.DOCKER_USER }}/html-tutorial:latest
82+
docker push ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}}
83+
docker push ${{ secrets.DOCKER_USER }}/html-tutorial:latest

.idoc/.filesStat.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,10 +3096,10 @@
30963096
"birthtime": "2022-04-24T07:43:17.343Z"
30973097
},
30983098
"docs/tags/video.md": {
3099-
"atime": "2022-05-29T10:14:59.107Z",
3100-
"mtime": "2022-05-29T10:14:59.731Z",
3101-
"ctime": "2022-05-29T10:14:59.731Z",
3102-
"birthtime": "2022-04-24T07:43:17.343Z"
3099+
"atime": "2022-05-29T10:18:17.135Z",
3100+
"mtime": "2022-05-29T10:18:16.995Z",
3101+
"ctime": "2022-05-29T10:18:16.995Z",
3102+
"birthtime": "2022-05-29T10:18:16.995Z"
31033103
},
31043104
"docs/tags/video_autoplay.md": {
31053105
"atime": "2022-04-29T15:27:16.999Z",
@@ -3222,10 +3222,10 @@
32223222
"birthtime": "2022-04-24T07:17:32.209Z"
32233223
},
32243224
"docs/attribute/global/spellcheck.md": {
3225-
"atime": "2022-05-16T10:46:52.068Z",
3226-
"mtime": "2022-05-16T10:48:44.160Z",
3227-
"ctime": "2022-05-16T10:48:44.160Z",
3228-
"birthtime": "2022-04-24T07:17:32.209Z"
3225+
"atime": "2022-05-29T10:18:17.221Z",
3226+
"mtime": "2022-05-29T10:18:16.994Z",
3227+
"ctime": "2022-05-29T10:18:16.994Z",
3228+
"birthtime": "2022-05-29T10:18:16.994Z"
32293229
},
32303230
"docs/attribute/global/style.md": {
32313231
"atime": "2022-05-09T04:16:28.450Z",
@@ -3270,10 +3270,10 @@
32703270
"birthtime": "2022-04-24T09:06:17.212Z"
32713271
},
32723272
"docs/attribute/accept.md": {
3273-
"atime": "2022-05-09T04:13:59.995Z",
3274-
"mtime": "2022-05-09T04:13:58.358Z",
3275-
"ctime": "2022-05-09T04:13:58.358Z",
3276-
"birthtime": "2022-04-24T09:03:44.746Z"
3273+
"atime": "2022-05-29T10:18:16.992Z",
3274+
"mtime": "2022-05-29T10:18:16.982Z",
3275+
"ctime": "2022-05-29T10:18:16.982Z",
3276+
"birthtime": "2022-05-29T10:18:16.982Z"
32773277
},
32783278
"docs/attribute/async.md": {
32793279
"atime": "2022-05-09T04:18:22.836Z",
@@ -3606,28 +3606,28 @@
36063606
"birthtime": "2022-04-24T09:54:54.966Z"
36073607
},
36083608
"docs/attribute/onbeforeprint.md": {
3609-
"atime": "2022-05-29T09:56:41.190Z",
3610-
"mtime": "2022-05-29T09:56:41.157Z",
3611-
"ctime": "2022-05-29T09:56:41.157Z",
3612-
"birthtime": "2022-04-24T09:54:54.966Z"
3609+
"atime": "2022-05-29T10:18:17.134Z",
3610+
"mtime": "2022-05-29T10:18:16.994Z",
3611+
"ctime": "2022-05-29T10:18:16.994Z",
3612+
"birthtime": "2022-05-29T10:18:16.994Z"
36133613
},
36143614
"docs/attribute/onblur.md": {
3615-
"atime": "2022-05-29T10:01:47.864Z",
3616-
"mtime": "2022-05-29T10:01:48.298Z",
3617-
"ctime": "2022-05-29T10:01:48.298Z",
3618-
"birthtime": "2022-04-24T09:54:54.966Z"
3615+
"atime": "2022-05-29T10:18:17.130Z",
3616+
"mtime": "2022-05-29T10:18:16.994Z",
3617+
"ctime": "2022-05-29T10:18:16.994Z",
3618+
"birthtime": "2022-05-29T10:18:16.994Z"
36193619
},
36203620
"docs/attribute/oncanplay.md": {
3621-
"atime": "2022-05-29T10:15:13.153Z",
3622-
"mtime": "2022-05-29T10:15:27.829Z",
3623-
"ctime": "2022-05-29T10:15:27.829Z",
3624-
"birthtime": "2022-04-24T09:54:54.966Z"
3621+
"atime": "2022-05-29T10:18:17.135Z",
3622+
"mtime": "2022-05-29T10:18:16.995Z",
3623+
"ctime": "2022-05-29T10:18:16.995Z",
3624+
"birthtime": "2022-05-29T10:18:16.994Z"
36253625
},
36263626
"docs/attribute/onbeforeunload.md": {
3627-
"atime": "2022-05-29T09:53:37.755Z",
3628-
"mtime": "2022-05-29T09:53:37.692Z",
3629-
"ctime": "2022-05-29T09:53:37.692Z",
3630-
"birthtime": "2022-04-24T09:54:54.966Z"
3627+
"atime": "2022-05-29T10:18:17.221Z",
3628+
"mtime": "2022-05-29T10:18:16.994Z",
3629+
"ctime": "2022-05-29T10:18:16.994Z",
3630+
"birthtime": "2022-05-29T10:18:16.994Z"
36313631
},
36323632
"docs/attribute/oncanplaythrough.md": {
36333633
"atime": "2022-04-29T15:27:16.649Z",
@@ -4632,9 +4632,9 @@
46324632
"birthtime": "2022-04-24T12:15:36.180Z"
46334633
},
46344634
"README.md": {
4635-
"atime": "2022-05-14T17:43:49.961Z",
4636-
"mtime": "2022-05-14T17:43:58.893Z",
4637-
"ctime": "2022-05-14T17:43:58.893Z",
4635+
"atime": "2022-05-29T15:54:06.231Z",
4636+
"mtime": "2022-05-29T15:54:06.366Z",
4637+
"ctime": "2022-05-29T15:54:06.366Z",
46384638
"birthtime": "2022-04-24T04:53:22.229Z"
46394639
}
46404640
}

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM nginx:1-alpine
2+
3+
ENV APPDIR /usr/share/nginx/html
4+
RUN mkdir -p $APPDIR
5+
6+
RUN cat /etc/nginx/conf.d/default.conf
7+
8+
WORKDIR $APPDIR
9+
10+
ADD ./dist /usr/share/nginx/html

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,24 @@ Tim Berners-Lee 被称为 HTML 之父。 HTML 的第一个可用描述是 Tim
103103

104104
<!--idoc:ignore:end-->
105105

106+
## Docker
107+
108+
```bash
109+
docker pull wcjiang/html-tutorial
110+
```
111+
112+
```bash
113+
docker run --name html-tutorial --rm -d -p 9666:80 wcjiang/html-tutorial:latest
114+
# Or
115+
docker run --name html-tutorial -itd -p 9666:80 wcjiang/html-tutorial:latest
116+
```
117+
118+
Visit the following URL in your browser
119+
120+
```bash
121+
http://localhost:9666/
122+
```
123+
106124
## Contributors
107125

108126
一如既往,感谢我们出色的贡献者!一天搬运一个慢慢攒吧,欢迎大家参与进来 :)。

0 commit comments

Comments
 (0)