From 1b2c480a55692b6f39d947f229f6dce4c2f3ce65 Mon Sep 17 00:00:00 2001 From: Kang Huaishuai Date: Wed, 14 Oct 2020 00:28:50 +0800 Subject: [PATCH] Add vscode devcontainer Signed-off-by: Kang Huaishuai --- .devcontainer/devcontainer.json | 20 ++++++++++++++++++++ .github/workflows/check-link.yml | 4 ++-- package.json | 3 +++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2ca1d99 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,20 @@ +{ + "image": "yeasy/docker_practice:latest", + "mounts": [ + "source=dp-code-remote-cache,target=/root/.vscode-server,type=volume" + ], + "settings": { + "terminal.integrated.shell.linux": "/bin/sh" + }, + "forwardPorts": [ + 4000 + ], + "runArgs": [ + "--cap-add=SYS_ADMIN" + ], + "postStartCommand": [ + "sh", + "-cx", + "pwd ; mkdir -p /workspaces/docker_practice/node_modules; mkdir -p /workspaces/docker_practice/_book; mount --bind /srv/gitbook/node_modules /workspaces/docker_practice/node_modules ; mount --bind /mnt /workspaces/docker_practice/_book" + ] +} diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index c74c054..684f357 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -1,8 +1,8 @@ name: check-link on: - push: - pull_request: + # push: + # pull_request: workflow_dispatch: jobs: diff --git a/package.json b/package.json index 9dbf99c..3ff639d 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", + "gitbook:help": "gitbook help", + "gitbook:build": "gitbook build", + "gitbook:serve": "gitbook serve", "vuepress:build": "npx vuepress build" }, "repository": {