Skip to content

Commit

Permalink
Try to fix missing deps for mkdocs-material's social preview plugin (#…
Browse files Browse the repository at this point in the history
…312)

* Try to fix missing deps for mkdocs-material's social preview plugin

* Set a `site_url` needed by the social preview plugin

* Fix missing `site_url` for edge channel of docs deployment

* Actually set `site_url`, via GitHub Environments env var

* Continue troubleshooting missing social preview cards

* Troubleshoot inability to set `site_url`

* Continue troubleshooting inability to set `site_Url`

* Continue troubleshooting inability to set `site_url`

* Continue troubleshooting inability to set `site_url`

* Continue troubleshooting inability to set `site_url`

* Clean up debugging code
  • Loading branch information
ethanjli committed Dec 7, 2023
1 parent f0e9926 commit 06befd1
Show file tree
Hide file tree
Showing 6 changed files with 284 additions and 69 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/documentation-deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ jobs:
deploy:
environment:
name: documentation-beta
url: https://docs-beta.planktoscope.community
url: ${{ vars.URL }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies for mkdocs-material image-processing libraries
run: |
sudo apt-get -y install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
sudo apt-get -y install pngquant
- name: Install poetry
run: pipx install poetry==1.5.0

Expand All @@ -38,7 +43,7 @@ jobs:
- name: Install build dependencies
run: |
poetry -C ./documentation/ install
poetry -C ./documentation/ install --with imaging
- name: Import external assets
run: poetry -C ./documentation/ run poe --root ./documentation/ import-external-assets
Expand All @@ -47,7 +52,10 @@ jobs:
run: poetry -C ./documentation/ run poe --root ./documentation/ set-beta-release-channel

- name: Build documentation
run: DOCS_DEPLOY=true poetry -C ./documentation/ run poe --root ./documentation/ build
env:
DOCS_DEPLOY: true
DOCS_SITEURL: ${{ vars.URL }}
run: poetry -C ./documentation/ run poe --root ./documentation/ build

- name: Push to ${{ vars.REPOSITORY_NAME }}
uses: cpina/github-action-push-to-another-repository@main
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/documentation-deploy-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ jobs:
deploy:
environment:
name: documentation-edge
url: ${{ steps.deployment.outputs.page_url }}
url: ${{ vars.URL }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies for mkdocs-material image-processing libraries
run: |
sudo apt-get -y install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
sudo apt-get -y install pngquant
- name: Install poetry
run: pipx install poetry==1.5.0

Expand All @@ -51,7 +56,7 @@ jobs:
- name: Install build dependencies
run: |
poetry -C ./documentation/ install
poetry -C ./documentation/ install --with imaging
- name: Import external assets
run: poetry -C ./documentation/ run poe --root ./documentation/ import-external-assets
Expand All @@ -60,7 +65,10 @@ jobs:
run: poetry -C ./documentation/ run poe --root ./documentation/ set-edge-release-channel

- name: Build documentation
run: DOCS_DEPLOY=true poetry -C ./documentation/ run poe --root ./documentation/ build
env:
DOCS_DEPLOY: true
DOCS_SITEURL: ${{ vars.URL }}
run: poetry -C ./documentation/ run poe --root ./documentation/ build

- name: Set up Pages
id: pages
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/documentation-deploy-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ jobs:
deploy:
environment:
name: documentation-stable
url: https://docs.planktoscope.community
url: ${{ vars.URL }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies for mkdocs-material image-processing libraries
run: |
sudo apt-get -y install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
sudo apt-get -y install pngquant
- name: Install poetry
run: pipx install poetry==1.5.0

Expand All @@ -38,13 +43,16 @@ jobs:
- name: Install build dependencies
run: |
poetry -C ./documentation/ install
poetry -C ./documentation/ install --with imaging
- name: Import external assets
run: poetry -C ./documentation/ run poe --root ./documentation/ import-external-assets

- name: Build documentation
run: DOCS_DEPLOY=true poetry -C ./documentation/ run poe --root ./documentation/ build
env:
DOCS_DEPLOY: true
DOCS_SITEURL: ${{ vars.URL }}
run: poetry -C ./documentation/ run poe --root ./documentation/ build

- name: Push to ${{ vars.REPOSITORY_NAME }}
uses: cpina/github-action-push-to-another-repository@main
Expand Down
4 changes: 2 additions & 2 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
site_name: PlanktoScope Documentation # poe(release-channels): substitute
site_description: An open and affordable imaging platform for \
citizen oceanography
site_description: An open and affordable imaging platform for citizen oceanography
site_url: !ENV DOCS_SITEURL
repo_url: https://github.com/PlanktoScope/PlanktoScope
edit_uri: edit/master/documentation/docs/

Expand Down

0 comments on commit 06befd1

Please sign in to comment.