diff options
| author | Árni Dagur <agudmundsson@fc-md.umd.edu> | 2020-05-24 02:57:26 -0400 |
|---|---|---|
| committer | Árni Dagur <agudmundsson@fc-md.umd.edu> | 2020-05-24 02:57:26 -0400 |
| commit | e539bde6508ed58e2bbe046a9c1720fe9cf501d5 (patch) | |
| tree | 9aea7aef24f12a7985f1b4ca423e5ff5bf53fe64 | |
| parent | d5662ab1302a612e52e92714aeca3eae8b8cf165 (diff) | |
Place a 'index.html' file at the root of Github Pages
| -rw-r--r-- | .github/workflows/ci.yml | 11 | ||||
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | web/create_site.bash | 10 | ||||
| -rw-r--r-- | web/static/index.html | 19 |
4 files changed, 33 insertions, 10 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0efb061..a5c429c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml | |||
| @@ -155,14 +155,11 @@ jobs: | |||
| 155 | toolchain: nightly | 155 | toolchain: nightly |
| 156 | override: true | 156 | override: true |
| 157 | 157 | ||
| 158 | - name: Build documentation | 158 | - name: Build Github Pages |
| 159 | uses: actions-rs/cargo@v1 | 159 | run: bash web/create_site.bash |
| 160 | with: | ||
| 161 | command: doc | ||
| 162 | args: --all-features | ||
| 163 | 160 | ||
| 164 | - name: Deploy documentation | 161 | - name: Deploy Github Pages |
| 165 | uses: peaceiris/actions-gh-pages@v3 | 162 | uses: peaceiris/actions-gh-pages@v3 |
| 166 | with: | 163 | with: |
| 167 | github_token: ${{ secrets.GITHUB_TOKEN }} | 164 | github_token: ${{ secrets.GITHUB_TOKEN }} |
| 168 | publish_dir: ./target/doc \ No newline at end of file | 165 | publish_dir: ./target/github-pages \ No newline at end of file |
| @@ -238,6 +238,3 @@ dmypy.json | |||
| 238 | # Cython debug symbols | 238 | # Cython debug symbols |
| 239 | cython_debug/ | 239 | cython_debug/ |
| 240 | 240 | ||
| 241 | # static files generated from Django application using `collectstatic` | ||
| 242 | media | ||
| 243 | static | ||
diff --git a/web/create_site.bash b/web/create_site.bash new file mode 100644 index 0000000..b106d8c --- /dev/null +++ b/web/create_site.bash | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | set -euxo pipefail | ||
| 3 | |||
| 4 | # This script assumes that the current working directory is the repository | ||
| 5 | # root. | ||
| 6 | |||
| 7 | mkdir -p target | ||
| 8 | cp -r web/static target/github-pages | ||
| 9 | cargo doc --all-features | ||
| 10 | cp -r target/doc target/github-pages/docs | ||
diff --git a/web/static/index.html b/web/static/index.html new file mode 100644 index 0000000..b50e061 --- /dev/null +++ b/web/static/index.html | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html> | ||
| 3 | <head> | ||
| 4 | <title>Python Adblock</title> | ||
| 5 | |||
| 6 | <meta charset="utf-8" /> | ||
| 7 | <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | ||
| 8 | </head> | ||
| 9 | |||
| 10 | <body> | ||
| 11 | <div> | ||
| 12 | <h1>Python Adblock</h1> | ||
| 13 | <ul> | ||
| 14 | <li><a href="docs/adblock/index.html">Documentation</a></li> | ||
| 15 | <li><a href="https://github.com/ArniDagur/python-adblock">Source code</a></li> | ||
| 16 | </ul> | ||
| 17 | </div> | ||
| 18 | </body> | ||
| 19 | </html> | ||
