Skip to content

Commit c8891d3

Browse files
authored
docs: fix workflows (#85)
Signed-off-by: Anne Chew <anne.chew@canonical.com>
1 parent 9435efa commit c8891d3

File tree

8 files changed

+127
-171
lines changed

8 files changed

+127
-171
lines changed

.github/workflows/add-docs-link-comment.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/canonical-cla-check.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Check for removed URLs
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build-docs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout PR branch
12+
uses: actions/checkout@v5
13+
with:
14+
# This implicitly gets the PR branch. Making it explicit causes problems
15+
# with private forks, but it is equivalent to the following:
16+
# repository: ${{ github.event.pull_request.head.repo.full_name }}
17+
# ref: ${{ github.event.pull_request.head.ref }}
18+
fetch-depth: 0
19+
path: compare
20+
- name: Checkout base branch
21+
uses: actions/checkout@v5
22+
with:
23+
ref: ${{ github.event.pull_request.base.ref }}
24+
repository: ${{ github.event.pull_request.base.repo.full_name }}
25+
fetch-depth: 0
26+
path: base
27+
- uses: actions/setup-python@v6
28+
- name: Build docs
29+
run: |
30+
for dir in compare base; do
31+
pushd ${dir}/docs
32+
make install
33+
. .sphinx/venv/bin/activate
34+
make html
35+
popd
36+
done
37+
- name: Generate current URLs list
38+
run: |
39+
for dir in compare base; do
40+
pushd ${dir}/docs
41+
find ./_build/ -name '*.html' \
42+
| sed 's|/_build||;s|/index.html$|/|;s|.html$||' \
43+
| sort > urls.txt
44+
popd
45+
done
46+
- name: Compare URLs
47+
run: |
48+
BASE_URLS_PATH="base/docs/urls.txt"
49+
COMPARE_URLS_PATH="compare/docs/urls.txt"
50+
removed=$(comm -23 ${BASE_URLS_PATH} ${COMPARE_URLS_PATH} )
51+
if [ -n "$removed" ]; then
52+
echo "The following URLs were removed:"
53+
echo "$removed"
54+
echo "Please ensure removed pages are redirected"
55+
exit 1
56+
fi

.github/workflows/cla-check.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This workflow checks if the contributor has signed the Canonical Contributor Licence Agreement (CLA)
2+
name: Canonical Contributor Licence Agreement check
3+
4+
on:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
cla-check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check if CLA signed
13+
uses: canonical/has-signed-canonical-cla@v2

.github/workflows/markdown-style-checks.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ jobs:
1616
markdown-lint:
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020
with:
2121
fetch-depth: 0
22-
- uses: DavidAnson/markdownlint-cli2-action@v16
23-
with:
24-
config: "docs/.sphinx/.markdownlint.json"
22+
- name: Create venv
23+
working-directory: "docs"
24+
run: make install
25+
- name: Lint markdown
26+
working-directory: "docs"
27+
run: make lint-md

.github/workflows/release-docx.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# The purpose of this workflow file is to confirm that the Sphinx
2+
# virtual environment can be built from source, consequently documenting
3+
# the packages required in the build environment to do that.
4+
#
5+
# This is needed because some projects embeds the documentation into built
6+
# artifacts which involves rendering the documentation on the target
7+
# architecture.
8+
#
9+
# Depending on the architecture, pip may or may not have already built wheels
10+
# available, and as such we need to make sure building wheels from source can
11+
# succeed.
12+
name: Sphinx python dependency build checks
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
workflow_dispatch: # manual trigger
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build:
26+
name: build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v5
31+
32+
- name: Install dependencies
33+
run: |
34+
set -ex
35+
sudo apt-get --fix-missing update
36+
sudo apt-get -y install \
37+
cargo \
38+
libpython3-dev \
39+
libxml2-dev \
40+
libxslt1-dev \
41+
make \
42+
python3-venv \
43+
rustc \
44+
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk libharfbuzz-dev libfribidi-dev libxcb1-dev
45+
- name: Build Sphinx venv
46+
working-directory: "docs"
47+
run: |
48+
set -ex
49+
make install \
50+
PIPOPTS="--no-binary :all:" \
51+
|| ( cat .sphinx/venv/pip_install.log && exit 1 )

.github/workflows/verify-commit-signoff.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)