Repository navigation
98 lines (94 loc) · 3.8 KB
/
Copy pathdocumentation.yml
File metadata and controls
98 lines (94 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: documentation
on:
pull_request:
branches:
- "**"
paths:
- ".github/workflows/documentation.yml"
- "metadata-ingestion/**"
- "metadata-models/**"
- "docs/**"
- "docs-website/**"
push:
branches:
- master
paths:
- ".github/workflows/documentation.yml"
- "metadata-ingestion/**"
- "metadata-models/**"
- "docs/**"
- "docs-website/**"
# release:
# types: [published, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
gh-pages:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
# We explicitly don't use acryldata/sane-checkout-action because docusaurus runs
# git commands to determine the last change date for each file.
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up toolchain
uses: ./.github/actions/setup-toolchain
with:
node: true
# Restore-only: ci-cache-warmup.yml warm-metadata-ingestion-uv-cache writes this
# key on both cache backends from every default-branch push.
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('metadata-ingestion/setup.py', 'metadata-ingestion/pyproject.toml', 'metadata-ingestion/uv.lock', 'metadata-ingestion/constraints.txt') }}
restore-keys: |
${{ runner.os }}-uv-
# docs-website:build runs yarnInstall for docs-website. Restore-only; the
# writer is ci-cache-warmup.yml warm-docs-website-yarn-cache.
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/yarn
key: docs-website-${{ runner.os }}-yarn-${{ hashFiles('docs-website/yarn.lock') }}
restore-keys: |
docs-website-${{ runner.os }}-yarn-
- name: Configure fast APT mirror
if: ${{ vars.CI_USE_FAST_API_MIRROR == 'true' }}
uses: ./.github/actions/configure-fast-apt-mirror
- name: Install Python dependencies
run: ./metadata-ingestion/scripts/install_deps.sh
- name: Run tests
run: |
./gradlew --info :metadata-ingestion:testScripts
./gradlew --info :docs-website:testPythonScripts
- name: Report test results
if: (!cancelled())
uses: ./.github/actions/report-test-results
with:
artifact-name: metadata-ingestion-scripts-test-results
test-results-paths: "metadata-ingestion/scripts/test-results/**"
junit-file-globs: "metadata-ingestion/scripts/test-results/*.xml"
- name: Report docs-website script test results
if: (!cancelled())
uses: ./.github/actions/report-test-results
with:
artifact-name: docs-website-scripts-test-results
test-results-paths: "docs-website/sphinx/test-results/**"
junit-file-globs: "docs-website/sphinx/test-results/*.xml"
- name: Build Docs
run: |
./gradlew --info docs-website:build
- name: Deploy
if: github.event_name == 'push' && github.repository == 'datahub-project/datahub'
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs-website/build
cname: datahubproject.io
# The gh-pages branch stores the built docs site. We don't need to preserve
# the full history of the .html files, since they're generated from our
# source files. Doing so significantly reduces the size of the repo's .git dir.
force_orphan: true