Skip to content

Commit f659243

Browse files
Updating file '.github/workflows/build-page.yml' with otterdog.
1 parent f98d845 commit f659243

File tree

1 file changed

+5
-75
lines changed

1 file changed

+5
-75
lines changed

.github/workflows/build-page.yml

+5-75
Original file line numberDiff line numberDiff line change
@@ -6,103 +6,33 @@ on:
66
branches:
77
- 'main'
88
paths:
9-
- 'otterdog/*.jsonnet'
109
- 'docs/**'
1110
- 'mkdocs.yml'
1211
- '.github/workflows/build-page.yml'
1312

1413
concurrency:
1514
group: "pages"
16-
cancel-in-progress: false
15+
cancel-in-progress: true
1716

1817
permissions:
1918
contents: read
2019
pages: write
2120
id-token: write
2221

2322
jobs:
24-
generate-markdown:
25-
# do not run the workflow in the template repo itself
26-
if: ${{ !contains (github.repository, '/.eclipsefdn-template') }}
27-
runs-on: ubuntu-latest
28-
steps:
29-
- name: Checkout eclipse-csi/otterdog
30-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
31-
with:
32-
repository: eclipse-csi/otterdog
33-
path: otterdog
34-
35-
- name: Checkout EclipseFdn/otterdog-configs
36-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
37-
with:
38-
repository: EclipseFdn/otterdog-configs
39-
path: otterdog-configs
40-
41-
# checkout the HEAD ref
42-
- name: Checkout HEAD
43-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
44-
with:
45-
path: ${{ github.repository_owner }}
46-
47-
- name: Install jsonnet-bundler
48-
run: |
49-
go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
50-
echo $(go env GOPATH)/bin >> $GITHUB_PATH
51-
52-
- name: Install poetry
53-
run: pipx install poetry
54-
55-
- name: Setup Python
56-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
57-
with:
58-
python-version: '3.10'
59-
cache: 'poetry'
60-
61-
- name: Install dependencies with poetry
62-
run: |
63-
poetry install --only=main
64-
working-directory: otterdog
65-
66-
- name: Copy configuration from HEAD ref
67-
run: |
68-
mkdir -p orgs/${{ github.repository_owner }}
69-
cp -r ../${{ github.repository_owner }}/otterdog/* orgs/${{ github.repository_owner }}
70-
working-directory: otterdog-configs
71-
72-
- name: Generate default configuration as markdown
73-
run: ../otterdog/otterdog.sh show-default ${{ github.repository_owner }} -c otterdog.json --markdown > default.txt
74-
working-directory: otterdog-configs
75-
76-
- name: Upload generated site content
77-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
78-
with:
79-
name: generated-site
80-
path: |
81-
otterdog-configs/default.txt
82-
otterdog-configs/orgs/${{ github.repository_owner }}/vendor/otterdog-defaults/*.libsonnet
83-
8423
build-page:
8524
runs-on: ubuntu-latest
86-
needs: generate-markdown
8725
steps:
88-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
89-
- name: Download generated site content
90-
uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
91-
with:
92-
name: generated-site
93-
- shell: bash
94-
run: |
95-
cat default.txt >> ./docs/playground.md
96-
cp orgs/${{ github.repository_owner }}/vendor/otterdog-defaults/*.libsonnet ./docs/jsonnet/
97-
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
26+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
27+
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
9828
with:
9929
python-version: 3.x
10030
cache: 'pip'
10131
- run: pip install -r requirements.txt
10232
- name: Build with Mkdocs
10333
run: mkdocs build
10434
- name: Setup Pages
105-
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0
35+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
10636
- name: Upload artifact
10737
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
10838

@@ -115,4 +45,4 @@ jobs:
11545
steps:
11646
- name: Deploy to GitHub Pages
11747
id: deployment
118-
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4
48+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)