From 2a5afbe3baac1b5617d17ab1b95874e51ffc0222 Mon Sep 17 00:00:00 2001 From: Shawn Wang Date: Tue, 24 Oct 2023 23:46:05 +0800 Subject: [PATCH 1/2] mdbook init --- .gitignore | 1 + README.md | 4 ++++ SUMMARY.md | 9 +++++++++ book.toml | 5 +++++ container-101/cgroup/README.md | 0 5 files changed, 19 insertions(+) create mode 100644 .gitignore create mode 100644 SUMMARY.md create mode 100644 book.toml create mode 100644 container-101/cgroup/README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7585238 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +book diff --git a/README.md b/README.md index 8d36f4a..471c544 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,7 @@ - test env: https://killercoda.com/csie-proj114 ![outline](./outline.jpg) + +這本手冊由 114 屆專題生共同編輯 + +[mdbook](https://rust-lang.github.io/mdBook) diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..c19164e --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,9 @@ +# csie-proj_114 + +[README](./README.md) + +- [Container 101](./container-101/README.md) + - [cgroup](./container-101/cgroup/README.md) + - [simple](./container-101/cgroup/simple.md) + - [v2](./container-101/cgroup/cgroup_v2.md) + diff --git a/book.toml b/book.toml new file mode 100644 index 0000000..5a53288 --- /dev/null +++ b/book.toml @@ -0,0 +1,5 @@ +[book] +authors = ["Shawn Wang"] +language = "en" +multilingual = false +src = "." diff --git a/container-101/cgroup/README.md b/container-101/cgroup/README.md new file mode 100644 index 0000000..e69de29 From cc757bf2148ff5748fc934922c923b45bdef03fa Mon Sep 17 00:00:00 2001 From: Shawn Wang Date: Tue, 24 Oct 2023 23:49:23 +0800 Subject: [PATCH 2/2] gh-pages --- .github/workflows/gh-pages.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..44d7fae --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,31 @@ +name: github pages + +on: + push: + branches: + - main + - mdbook + pull_request: + +jobs: + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v2 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.10' + # mdbook-version: 'latest' + + - run: mdbook build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + # if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book