commit e539bde6508ed58e2bbe046a9c1720fe9cf501d5
parent d5662ab1302a612e52e92714aeca3eae8b8cf165
Author: Árni Dagur <agudmundsson@fc-md.umd.edu>
Date: Sun, 24 May 2020 02:57:26 -0400
Place a 'index.html' file at the root of Github Pages
Diffstat:
4 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
@@ -155,14 +155,11 @@ jobs:
toolchain: nightly
override: true
- - name: Build documentation
- uses: actions-rs/cargo@v1
- with:
- command: doc
- args: --all-features
+ - name: Build Github Pages
+ run: bash web/create_site.bash
- - name: Deploy documentation
+ - name: Deploy Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./target/doc
-\ No newline at end of file
+ publish_dir: ./target/github-pages
+\ No newline at end of file
diff --git a/.gitignore b/.gitignore
@@ -238,6 +238,3 @@ dmypy.json
# Cython debug symbols
cython_debug/
-# static files generated from Django application using `collectstatic`
-media
-static
diff --git a/web/create_site.bash b/web/create_site.bash
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -euxo pipefail
+
+# This script assumes that the current working directory is the repository
+# root.
+
+mkdir -p target
+cp -r web/static target/github-pages
+cargo doc --all-features
+cp -r target/doc target/github-pages/docs
diff --git a/web/static/index.html b/web/static/index.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Python Adblock</title>
+
+ <meta charset="utf-8" />
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ </head>
+
+ <body>
+ <div>
+ <h1>Python Adblock</h1>
+ <ul>
+ <li><a href="docs/adblock/index.html">Documentation</a></li>
+ <li><a href="https://github.com/ArniDagur/python-adblock">Source code</a></li>
+ </ul>
+ </div>
+ </body>
+</html>