diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a722415 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,29 @@ +name: Deploy mdBook to GitHub Pages + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install mdBook + run: cargo install mdbook --vers "^0.4.15" + + - name: Build mdBook + run: mdbook build + + - name: List output files + run: ls -R book + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./book diff --git a/.gitignore b/.gitignore index 7585238..e9c0728 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -book +book \ No newline at end of file diff --git a/README.md b/README.md index 6de5caf..34a48c2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Effective Rust 中文翻译 -这是《Effective Rust》的中文翻译,原文地址:[Effective Rust](!https://www.lurklurk.org/effective-rust/cover.html) \ No newline at end of file +这是《Effective Rust》的中文翻译,原文地址:[Effective Rust](https://www.lurklurk.org/effective-rust/cover.html) \ No newline at end of file