Skip to content

Publish docs

Publish docs #9

Workflow file for this run

name: Publish docs
on:
workflow_dispatch: ~
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v3
with:
repository: scalableminds/webknossos
path: docs/wk-repo
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: "3.10"
architecture: 'x64'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build Docs
run: |
docs/generate.sh --persist
- name: Push docs
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "eu-west-1"
run: |
CI_BRANCH=${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}
NORMALIZED_CI_BRANCH=${CI_BRANCH//[\/-]/_}
aws s3 sync --acl public-read docs/out s3://static.webknossos.org/docs/${NORMALIZED_CI_BRANCH}
- name: Check links (on master)
env:
SLACK_HOOK: ${{ secrets.LINK_CHECKER_SLACK_HOOK }}
run: |
cd docs
poetry run linkchecker https://docs.webknossos.org > link_status || \
curl -X POST --data-urlencode "payload={\"text\": \":warning: Broken Links on doc.webknossos.org :warning:\n"'```'"\n$(cat link_status)\n"'```"}' \
"$SLACK_HOOK"