Skip to content

Commit

Permalink
Automatically deploy stable versions of the docs site to docs.plankto…
Browse files Browse the repository at this point in the history
…scope.community (#299)

* Add GitHub Actions workflow to deploy stable docs

* Update URLs in the documentation which had linked to the docs-edge site

* Fix typo in non-standard software installation guide
  • Loading branch information
ethanjli committed Dec 1, 2023
1 parent 0679dc7 commit 0341043
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/documentation-deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Deploy documentation (beta release channel)
on:
push:
branches:
- 'beta'
- 'documentation/beta'
workflow_dispatch:

Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/documentation-deploy-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy documentation (stable release channel)

on:
push:
branches:
- 'documentation/stable'
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
# queued. But do not cancel in-progress runs - we want these deploymeents to complete.
concurrency:
group: "docs-stable-deploy"
cancel-in-progress: false

defaults:
run:
shell: bash

jobs:
deploy:
environment:
name: documentation-stable
url: https://docs.planktoscope.community
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install poetry
run: pipx install poetry==1.5.0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
cache-dependency-path: |
documentation/poetry.lock
- name: Install build dependencies
run: |
poetry -C ./documentation/ install --with docs
- name: Import external assets
run: poetry -C ./documentation/ run poe --root ./documentation/ import-external-assets

- name: Build documentation
run: poetry -C ./documentation/ run poe --root ./documentation/ build

- name: Push to ${{ vars.REPOSITORY_NAME }}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.DOCS_BETA_SSH_DEPLOY_KEY }}
with:
source-directory: documentation/site/
destination-github-username: PlanktoScope
destination-repository-name: ${{ vars.REPOSITORY_NAME }}
user-email: github-actions[bot]@users.noreply.github.com
user-name: github-actions[bot]
commit-message: Deploy ORIGIN_COMMIT
target-directory: site
2 changes: 1 addition & 1 deletion documentation/docs/setup/hardware/index-noguides.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# PlanktoScope Hardware

You are viewing a copy of the PlanktoScope project documentation without the hardware setup guides, probably because you're viewing an offline, reduced-size copy of the PlanktoScope documentation served by your PlanktoScope. You should go to an [online copy of the PlanktoScope documentation](https://docs-edge.planktoscope.community) to find the hardware setup guides.
You are viewing a copy of the PlanktoScope project documentation without the hardware setup guides, probably because you're viewing an offline, reduced-size copy of the PlanktoScope documentation served by your PlanktoScope. You should go to an [online copy of the PlanktoScope documentation](https://docs.planktoscope.community) to find the hardware setup guides.
6 changes: 2 additions & 4 deletions documentation/docs/setup/software/nonstandard-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ Next, configure your Raspberry Pi to get internet access - your Raspberry Pi wil

## Set up the PlanktoScope software distribution

Depending on whether you're installing the software on a PlanktoScope with the custom PlanktoScope HAT (which is the standard HAT on v2.3 hardware and later) or with the Adafruit Stepper Motor HAT (which is the standard HAT on v2.1 hardware), you will need to replace, you will need to adjust the commands below. Specifically, if you're installing the software for a PlanktoScope with the Adafruit Stepper Motor HAT, you will need to replace the word `pscopehat` with the word `adafruithat` in any of the commands below.

### Run the installation script

Depending on whether you're installing the software on a PlanktoScope with the custom PlanktoScope HAT (which is the standard HAT on v2.3 hardware and later) or with the Adafruit Stepper Motor HAT (which is the standard HAT on v2.1 hardware), you will need to adjust the commands below. Specifically, if you're installing the software for a PlanktoScope with the Adafruit Stepper Motor HAT, you will need to replace the word `pscopehat` with the word `adafruithat` in any of the commands below.

Log in to your Raspberry Pi and (if you installed a version of Raspberry Pi OS with a graphical desktop) open a terminal. Then type in one of the following commands, for either the latest beta prerelease of the PlanktoScope software distribution, the latest stable release, or the latest development version:

=== "latest beta"
Expand Down Expand Up @@ -103,8 +103,6 @@ wget -qO - https://install.planktoscope.community/distro.sh \
| sh -s -- --help
```



### Wait for installation to finish

The installation process will take a long time (at least 30 minutes, if you have a fast internet connection) to finish.
Expand Down
3 changes: 1 addition & 2 deletions documentation/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ license = "CC-BY-SA-4.0"
readme = "README.md"
homepage = "https://www.planktoscope.org"
repository = "https://github.com/PlanktoScope/PlanktoScope"
# FIXME: once we have the docs up at docs.planktoscope.org, we should update this URL
documentation = "https://docs-edge.planktoscope.community"
documentation = "https://docs.planktoscope.community"
keywords = ["documentation", "planktoscope"]
classifiers = [
"Intended Audience :: Science/Research",
Expand Down

0 comments on commit 0341043

Please sign in to comment.