MKDocs conversion (#278)
Closes #252, Closes #250 ## Changes - ReplayWeb.page uses MKDocs for documentation now! - Requires both [`mkdocs-macros`](https://mkdocs-macros-plugin.readthedocs.io/en/latest/) and [`mkdocs-redirects`] (https://github.com/mkdocs/mkdocs-redirects) plugins to be installed - Redirects existing docs pages to their new locations under either `/embedding` or `/user-guide` - Unused images have been removed - Adds new ReplayWeb.page branding! All pages have received copy edits. All references to future (or previously) planned features have been removed. More major content changes of note are as follows: ### Supported Locations - Made into a page, no longer a table. Locations are either supported or not listed. ### Offline Use - Removes browser cache section, adds improved PWA install and uninstall instructions. - Removes navigation instructions to GitHub's releases section in favour of a link ### Supported Formats - Moved to the User Guide homepage - Updated the format support ### Exploring Archives - Example links for showcasing features have been moved to their respective feature documentation section on this page ### Remove Usage, Examples, and Troubleshooting Pages - Usage content is covered in the user guide index - Troubleshooting content has been added to a question section on the getting started page about WARC vs WACZ. - Examples are now Featured Projects on the docs homepage! ### Build Process - Removes Jekyll & related site assets. - Adds new GitHub action for publishing - Adds a python macro to dynamically load the replayweb.page version from package.json - Relocates replayweb.page site content under /site (including docs) - Some assets (favicon, logo) and sw.js/ui.js automatically copied into /site --------- Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
This commit is contained in:
co-authored by
Ilya Kreymer
parent
d276609ffe
commit
a4de740999
@@ -1,86 +0,0 @@
|
||||
name: Deploy Jekyll + Webpack build to Pages
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Detect package manager
|
||||
id: detect-package-manager
|
||||
run: |
|
||||
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
|
||||
echo "manager=yarn" >> $GITHUB_OUTPUT
|
||||
echo "command=install" >> $GITHUB_OUTPUT
|
||||
echo "runner=yarn" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
elif [ -f "${{ github.workspace }}/package.json" ]; then
|
||||
echo "manager=npm" >> $GITHUB_OUTPUT
|
||||
echo "command=ci" >> $GITHUB_OUTPUT
|
||||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
else
|
||||
echo "Unable to determine package manager"
|
||||
exit 1
|
||||
fi
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
index.html
|
||||
ui.js
|
||||
node_modules/.cache/webpack/
|
||||
key: ${{ runner.os }}-webpack-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('index.html', 'ui.js') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-webpack-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
|
||||
- name: Install dependencies
|
||||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
|
||||
- name: Build with Webpack
|
||||
run: ${{ steps.detect-package-manager.outputs.runner }} build
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
with:
|
||||
source: ./
|
||||
destination: ./_site
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
@@ -2,6 +2,8 @@ name: Playwright Integration
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
name: site-publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'site/**'
|
||||
- 'mkdocs/**'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
deploy_site:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Yarn Install
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Yarn Build
|
||||
run: yarn build
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: pip install mkdocs-macros-plugin mkdocs-redirects mkdocs-material
|
||||
- run: cd mkdocs && mkdocs gh-deploy --force
|
||||
Reference in New Issue
Block a user