summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2021-06-23 23:34:39 -0400
committerGitHub <noreply@github.com>2021-06-23 23:34:39 -0400
commitb67c928f2b889aaf6ab5bab81eb57f1649ef56ca (patch)
treedf815055cd69bd72660c2ae1e8e96ddecaa6fd8d
parent93b899e7458bda4b53a8f3edbb84f4591afaefae (diff)
docs: Switch to mike for versioning (#521)
Switches to mike to add versioning to docs.
-rw-r--r--.github/workflows/docs.yml36
-rw-r--r--.github/workflows/post-deploy.yml46
-rw-r--r--.github/workflows/post-release.yml100
-rw-r--r--CHANGELOG.md4
-rw-r--r--docs/content/contribution/documentation.md2
-rw-r--r--docs/mkdocs.yml8
6 files changed, 138 insertions, 58 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index f9faaa71..edfa9602 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -1,28 +1,48 @@
name: docs
on:
workflow_dispatch:
- # inputs:
- # version:
- # description: "The documentation version to update. Defaults to nightly."
- # default: "nightly"
- # required: false
push:
branches:
- master
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
+
+env:
+ # Assign commit authorship to official Github Actions bot when pushing to the `gh-pages` branch:
+ GIT_USER: 'github-actions[bot]'
+ GIT_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'
+
jobs:
build-documentation:
name: Build and deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
- uses: actions/setup-python@v2
with:
python-version: 3.x
+
- run: pip install mkdocs-material
+
- run: pip install mdx_truly_sane_lists
- - run: |
- cd docs/
- mkdocs gh-deploy --force
+
+ - run: pip install mike
+
+ - name: Configure git user and email
+ run: |
+ git config --global user.name ${GIT_USER}
+ git config --global user.email ${GIT_EMAIL}
+ echo Name: $(git config --get user.name)
+ echo Email: $(git config --get user.email)
+
+
+ - name: Build and deploy docs with mike
+ run: |
+ cd docs
+ mike deploy nightly --push
+ mike set-default --push nightly
+
diff --git a/.github/workflows/post-deploy.yml b/.github/workflows/post-deploy.yml
deleted file mode 100644
index 844c0086..00000000
--- a/.github/workflows/post-deploy.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-# A short amount of actions to run after releasing. This is mostly just to trigger other repos to run specific actions.
-
-name: post-deploy script
-
-on:
- release:
- types: [published]
-
-jobs:
- post-deploy:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
-
- - name: Set env
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
-
- - name: Test env
- run: |
- echo $RELEASE_VERSION
-
- - name: Make sure you're not on master...
- run: |
- if [[ $RELEASE_VERSION == "master" ]]; then
- exit 1
- fi
-
- - name: Make sure you're not on nightly...
- run: |
- if [[ $RELEASE_VERSION == "nightly" ]]; then
- exit 1
- fi
-
- - name: Trigger homebrew
- run: |
- curl -X POST https://api.github.com/repos/ClementTsang/homebrew-bottom/dispatches \
- -H 'Accept: application/vnd.github.everest-preview+json' \
- -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
- --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
-
- - name: Trigger choco
- run: |
- curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \
- -H 'Accept: application/vnd.github.everest-preview+json' \
- -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
- --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml
new file mode 100644
index 00000000..9f0836a1
--- /dev/null
+++ b/.github/workflows/post-release.yml
@@ -0,0 +1,100 @@
+# Actions to run after releasing a version.
+name: post-release
+
+on:
+ release:
+ types: [published]
+
+env:
+ # Assign commit authorship to official Github Actions bot when pushing to the `gh-pages` branch:
+ GIT_USER: 'github-actions[bot]'
+ GIT_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'
+
+jobs:
+ docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Set env
+ run: |
+ export RELEASE_VERSION=${{ github.event.release.tag_name }}
+ echo "RELEASE_VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV
+
+ - name: Test env
+ run: |
+ echo $RELEASE_VERSION
+
+ - name: Make sure you're not on master...
+ run: |
+ if [[ $RELEASE_VERSION == "master" ]]; then
+ exit 1
+ fi
+
+ - name: Make sure you're not on nightly...
+ run: |
+ if [[ $RELEASE_VERSION == "nightly" ]]; then
+ exit 1
+ fi
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.x
+
+ - run: pip install mkdocs-material
+
+ - run: pip install mdx_truly_sane_lists
+
+ - run: pip install mike
+
+ - name: Configure git user and email
+ run: |
+ git config --global user.name ${GIT_USER}
+ git config --global user.email ${GIT_EMAIL}
+ echo Name: $(git config --get user.name)
+ echo Email: $(git config --get user.email)
+
+ - name: Build and deploy docs with mike
+ run: |
+ cd docs
+ mike deploy --push --update-aliases ${RELEASE_VERSION} stable
+
+ packaging:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set env
+ run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
+
+ - name: Test env
+ run: |
+ echo $RELEASE_VERSION
+
+ - name: Make sure you're not on master...
+ run: |
+ if [[ $RELEASE_VERSION == "master" ]]; then
+ exit 1
+ fi
+
+ - name: Make sure you're not on nightly...
+ run: |
+ if [[ $RELEASE_VERSION == "nightly" ]]; then
+ exit 1
+ fi
+
+ - name: Trigger homebrew
+ run: |
+ curl -X POST https://api.github.com/repos/ClementTsang/homebrew-bottom/dispatches \
+ -H 'Accept: application/vnd.github.everest-preview+json' \
+ -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
+ --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
+
+ - name: Trigger choco
+ run: |
+ curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \
+ -H 'Accept: application/vnd.github.everest-preview+json' \
+ -u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
+ --data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8ad0ba3..e26328a7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.6.2]/[0.7.0] - Unreleased
+## Features
+
+- [#518](https://github.com/ClementTsang/bottom/pull/518): Add `F9` key as an alternative process kill key.
+
## Bug Fixes
- [#504](https://github.com/ClementTsang/bottom/pull/504): Fixes two bugs causing the battery widget colours and mouse events to be broken.
diff --git a/docs/content/contribution/documentation.md b/docs/content/contribution/documentation.md
index 88fab072..b7e57d6f 100644
--- a/docs/content/contribution/documentation.md
+++ b/docs/content/contribution/documentation.md
@@ -26,4 +26,6 @@ There are a few areas where documentation changes are often needed:
- For changes to the extended documentation, you'll want [MkDocs](https://www.mkdocs.org/), [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/), and `mdx_truly_sane_lists` installed to provide live reloading and preview for your changes. You can do so through `pip` or your system's package managers. While you don't _need_ these, it'll probably help in making and validating changes.
+ You may also want [Mike](https://github.com/jimporter/mike), but it isn't really needed.
+
3. Once you have your documentation changes done, submit it as a pull request. For more information regarding that, refer to [Issues and Pull Requests](http://127.0.0.1:8000/contribution/issues-and-pull-requests/).
diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml
index addf8479..6780a91f 100644
--- a/docs/mkdocs.yml
+++ b/docs/mkdocs.yml
@@ -103,10 +103,10 @@ markdown_extensions:
- mdx_truly_sane_lists # See https://github.com/mkdocs/mkdocs/issues/545#issuecomment-522196661
extra:
-# Versioning
-# version:
-# provider: mike
-# default: nightly
+ # Versioning
+ version:
+ provider: mike
+ default: nightly
# GA
analytics:
provider: google