Skip to content

Commit

Permalink
feat: Support docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 29, 2022
1 parent f7306c2 commit 98b7f07
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 32 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,23 @@ jobs:
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/html-tutorial/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
${{ steps.changelog.outputs.changelog }}
```
# Create Docker Image
- name: Docker login
if: steps.create_tag.outputs.successful
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}

- name: Build docs image
if: steps.create_tag.outputs.successful
run: docker image build -t html-tutorial .

- name: Tags & Push image
if: steps.create_tag.outputs.successful
run: |
echo "outputs.tag - ${{ steps.changelog.outputs.version }}"
docker tag html-tutorial ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}}
docker tag html-tutorial ${{ secrets.DOCKER_USER }}/html-tutorial:latest
docker push ${{ secrets.DOCKER_USER }}/html-tutorial:${{steps.changelog.outputs.version}}
docker push ${{ secrets.DOCKER_USER }}/html-tutorial:latest
62 changes: 31 additions & 31 deletions .idoc/.filesStat.json
Original file line number Diff line number Diff line change
Expand Up @@ -3096,10 +3096,10 @@
"birthtime": "2022-04-24T07:43:17.343Z"
},
"docs/tags/video.md": {
"atime": "2022-05-29T10:14:59.107Z",
"mtime": "2022-05-29T10:14:59.731Z",
"ctime": "2022-05-29T10:14:59.731Z",
"birthtime": "2022-04-24T07:43:17.343Z"
"atime": "2022-05-29T10:18:17.135Z",
"mtime": "2022-05-29T10:18:16.995Z",
"ctime": "2022-05-29T10:18:16.995Z",
"birthtime": "2022-05-29T10:18:16.995Z"
},
"docs/tags/video_autoplay.md": {
"atime": "2022-04-29T15:27:16.999Z",
Expand Down Expand Up @@ -3222,10 +3222,10 @@
"birthtime": "2022-04-24T07:17:32.209Z"
},
"docs/attribute/global/spellcheck.md": {
"atime": "2022-05-16T10:46:52.068Z",
"mtime": "2022-05-16T10:48:44.160Z",
"ctime": "2022-05-16T10:48:44.160Z",
"birthtime": "2022-04-24T07:17:32.209Z"
"atime": "2022-05-29T10:18:17.221Z",
"mtime": "2022-05-29T10:18:16.994Z",
"ctime": "2022-05-29T10:18:16.994Z",
"birthtime": "2022-05-29T10:18:16.994Z"
},
"docs/attribute/global/style.md": {
"atime": "2022-05-09T04:16:28.450Z",
Expand Down Expand Up @@ -3270,10 +3270,10 @@
"birthtime": "2022-04-24T09:06:17.212Z"
},
"docs/attribute/accept.md": {
"atime": "2022-05-09T04:13:59.995Z",
"mtime": "2022-05-09T04:13:58.358Z",
"ctime": "2022-05-09T04:13:58.358Z",
"birthtime": "2022-04-24T09:03:44.746Z"
"atime": "2022-05-29T10:18:16.992Z",
"mtime": "2022-05-29T10:18:16.982Z",
"ctime": "2022-05-29T10:18:16.982Z",
"birthtime": "2022-05-29T10:18:16.982Z"
},
"docs/attribute/async.md": {
"atime": "2022-05-09T04:18:22.836Z",
Expand Down Expand Up @@ -3606,28 +3606,28 @@
"birthtime": "2022-04-24T09:54:54.966Z"
},
"docs/attribute/onbeforeprint.md": {
"atime": "2022-05-29T09:56:41.190Z",
"mtime": "2022-05-29T09:56:41.157Z",
"ctime": "2022-05-29T09:56:41.157Z",
"birthtime": "2022-04-24T09:54:54.966Z"
"atime": "2022-05-29T10:18:17.134Z",
"mtime": "2022-05-29T10:18:16.994Z",
"ctime": "2022-05-29T10:18:16.994Z",
"birthtime": "2022-05-29T10:18:16.994Z"
},
"docs/attribute/onblur.md": {
"atime": "2022-05-29T10:01:47.864Z",
"mtime": "2022-05-29T10:01:48.298Z",
"ctime": "2022-05-29T10:01:48.298Z",
"birthtime": "2022-04-24T09:54:54.966Z"
"atime": "2022-05-29T10:18:17.130Z",
"mtime": "2022-05-29T10:18:16.994Z",
"ctime": "2022-05-29T10:18:16.994Z",
"birthtime": "2022-05-29T10:18:16.994Z"
},
"docs/attribute/oncanplay.md": {
"atime": "2022-05-29T10:15:13.153Z",
"mtime": "2022-05-29T10:15:27.829Z",
"ctime": "2022-05-29T10:15:27.829Z",
"birthtime": "2022-04-24T09:54:54.966Z"
"atime": "2022-05-29T10:18:17.135Z",
"mtime": "2022-05-29T10:18:16.995Z",
"ctime": "2022-05-29T10:18:16.995Z",
"birthtime": "2022-05-29T10:18:16.994Z"
},
"docs/attribute/onbeforeunload.md": {
"atime": "2022-05-29T09:53:37.755Z",
"mtime": "2022-05-29T09:53:37.692Z",
"ctime": "2022-05-29T09:53:37.692Z",
"birthtime": "2022-04-24T09:54:54.966Z"
"atime": "2022-05-29T10:18:17.221Z",
"mtime": "2022-05-29T10:18:16.994Z",
"ctime": "2022-05-29T10:18:16.994Z",
"birthtime": "2022-05-29T10:18:16.994Z"
},
"docs/attribute/oncanplaythrough.md": {
"atime": "2022-04-29T15:27:16.649Z",
Expand Down Expand Up @@ -4632,9 +4632,9 @@
"birthtime": "2022-04-24T12:15:36.180Z"
},
"README.md": {
"atime": "2022-05-14T17:43:49.961Z",
"mtime": "2022-05-14T17:43:58.893Z",
"ctime": "2022-05-14T17:43:58.893Z",
"atime": "2022-05-29T15:54:06.231Z",
"mtime": "2022-05-29T15:54:06.366Z",
"ctime": "2022-05-29T15:54:06.366Z",
"birthtime": "2022-04-24T04:53:22.229Z"
}
}
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM nginx:1-alpine

ENV APPDIR /usr/share/nginx/html
RUN mkdir -p $APPDIR

RUN cat /etc/nginx/conf.d/default.conf

WORKDIR $APPDIR

ADD ./dist /usr/share/nginx/html
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,24 @@ Tim Berners-Lee 被称为 HTML 之父。 HTML 的第一个可用描述是 Tim

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

## Docker

```bash
docker pull wcjiang/html-tutorial
```

```bash
docker run --name html-tutorial --rm -d -p 9666:80 wcjiang/html-tutorial:latest
# Or
docker run --name html-tutorial -itd -p 9666:80 wcjiang/html-tutorial:latest
```

Visit the following URL in your browser

```bash
http://localhost:9666/
```

## Contributors

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

0 comments on commit 98b7f07

Please sign in to comment.