Skip to content

Commit 1888b23

Browse files
authored
Merge branch 'main' into 3803-update-premium-service-pages
2 parents 7713c60 + 321b3e7 commit 1888b23

File tree

507 files changed

+2488
-2380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+2488
-2380
lines changed

.github/actions/redirection-verification/package-lock.json

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build-from-fork.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: github.event.label.name == 'build-fork' || contains(github.event.pull_request.labels.*.name, 'build-fork')
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
with:
2323
ref: ${{ github.event.pull_request.head.sha }}
2424
token: ${{ secrets.WORKFLOW_TOKEN }}

.github/workflows/check-labels.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
if: github.event.action == 'opened' || github.event.action == 'reopened'
2828
steps:
2929
- name: Get repo
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
with:
3232
ref: ${{ github.event.pull_request.head.sha }}
3333
- name: Verify label exists

.github/workflows/comment-on-pr.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
jobs:
1313
comment:
1414
runs-on: ubuntu-latest
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1516
steps:
1617
- uses: actions/checkout@v2
1718

.github/workflows/linting.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
site: ['platform', 'upsun']
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323

2424
- name: Set up Node.js
25-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@v4
2626
with:
2727
node-version: 16
2828
cache: 'npm'

.github/workflows/manage-environment.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
github.event.pull_request.head.repo.id == 21975579
2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828

2929
# Set up workflow environment to use the Platform.sh CLI
3030
- name: Set up Platform.sh CLI
@@ -60,7 +60,7 @@ jobs:
6060
github.event.pull_request.head.repo.id == 21975579
6161
steps:
6262
- name: Checkout repository
63-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
6464

6565
# Set up workflow environment to use the Platform.sh CLI
6666
- name: Set up Platform.sh CLI
@@ -79,7 +79,7 @@ jobs:
7979
contains(github.event.pull_request.labels.*.name, 'build-fork')
8080
steps:
8181
- name: Checkout repository
82-
uses: actions/checkout@v3
82+
uses: actions/checkout@v4
8383

8484
- name: Check if Git branch exists
8585
id: branch_exists
+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Optimize Images in PR
2+
on:
3+
pull_request:
4+
branches: [main]
5+
types: [opened, reopened, synchronize]
6+
paths:
7+
- '**/*.png'
8+
- '**/*.jpg'
9+
10+
jobs:
11+
optimize-images:
12+
name: Optimize Images
13+
runs-on: ubuntu-latest
14+
# Run only for PRs from default repo and approved PRs from forks
15+
if: github.event.pull_request.head.repo.id == 21975579 || contains(github.event.pull_request.labels.*.name, 'build-fork')
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
21+
fetch-depth: 0
22+
23+
- name: Set up environment
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y optipng jpegoptim
27+
28+
- name: Find changed image files
29+
id: changed-files
30+
uses: tj-actions/changed-files@v41
31+
with:
32+
files: |
33+
sites/**/*.png
34+
sites/**/*.jpg
35+
36+
- name: Run image optimization
37+
if: steps.changed-files.outputs.any_changed == 'true'
38+
env:
39+
ALL_CHANGED_IMGS: ${{ steps.changed-files.outputs.all_changed_files }}
40+
run: |
41+
for file in ${ALL_CHANGED_IMGS}; do
42+
if [[ "$file" == *.png ]]; then
43+
optipng "$file"
44+
elif [[ "$file" == *.jpg || "$file" == *.jpeg ]]; then
45+
jpegoptim "$file"
46+
fi
47+
done
48+
49+
- name: Commit optimized images
50+
if: steps.changed-files.outputs.any_changed == 'true'
51+
env:
52+
ALL_CHANGED_IMGS: ${{ steps.changed-files.outputs.all_changed_files }}
53+
run: |
54+
git config --local user.email "[email protected]"
55+
git config --local user.name "GitHub Action"
56+
git add ${ALL_CHANGED_IMGS}
57+
git diff --quiet && git diff --staged --quiet || git commit -m "Optimize images" -m "Automatically optimized images using optipng and jpegoptim via GitHub Actions"
58+
git push

.github/workflows/pr-check-links.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
# Run only for PRs from default repo and approved PRs from forks
1616
if: github.event.pull_request.head.repo.id == 21975579 || contains(github.event.pull_request.labels.*.name, 'build-fork')
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919

2020
- name: Set up Node
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version: 18
2424
cache: npm

.github/workflows/scheduled-check-links.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
env:
125125
ARTIFACT: ${{ env.artifact }}
126126
DOMAIN: ${{ steps.get-domain-name.outputs.domain }}
127-
uses: actions/github-script@v6
127+
uses: actions/github-script@v7
128128
with:
129129
script: |
130130
const { ARTIFACT, DOMAIN } = process.env

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ sites/bin
1111
bin
1212
cypress/e2e/1-getting-started
1313
cypress/e2e/2-advanced-examples
14+
venv/*

.platform/applications.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
relationships:
2020
search: "search:http"
21-
database: "db:mysql"
2221

2322
# The hooks that will be triggered when the package is deployed.
2423
hooks:
@@ -40,7 +39,7 @@
4039
# The configuration of the application when it is exposed to the web.
4140
web:
4241
commands:
43-
# Run (404) error and feedback handler
42+
# Run (404) error
4443
start: cd $SITE_DIR && node index.js
4544
locations:
4645
'/':
@@ -54,7 +53,9 @@
5453
rules:
5554
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|yaml|ico|svg?|cast|mp4|json|yaml|svg?|ttf)$:
5655
expires: 4w
57-
56+
\.md$:
57+
headers:
58+
Content-Type: text/markdown
5859
disk: 1024
5960

6061
mounts:
@@ -84,7 +85,6 @@
8485

8586
relationships:
8687
search: "search:http"
87-
database: "db:mysql"
8888

8989
# The hooks that will be triggered when the package is deployed.
9090
hooks:
@@ -104,7 +104,7 @@
104104
# The configuration of the application when it is exposed to the web.
105105
web:
106106
commands:
107-
# Run (404) error and feedback handler
107+
# Run (404) error
108108
start: cd $SITE_DIR && node index.js
109109
locations:
110110
'/':

.platform/services.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
db:
2-
type: mariadb:10.5
3-
disk: 256
4-
size: S

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
optimize-images:
2+
find sites -iname '*.png' -exec optipng {} \;
3+
find sites -iname '*.jpg' -exec jpegoptim {} \;

cypress/e2e/search.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe("Searches",()=>{
8686

8787
it("Searches for something that should ONLY match on platformsh, but not on Upsun", () => {
8888
const searchDetails = {
89-
search: '24.55',
89+
search: 'DG3',
9090
header: 'No results',
9191
body: 'No documentation matched'
9292
}

sites/platform/config/_default/config.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,46 @@ summaryLength: 3
2828
outputs:
2929
home:
3030
- HTML
31+
- markdown
3132
- JSON
3233
- RSS
3334
- devcenter
35+
- llms
36+
- llms-full
3437
section:
3538
- HTML
39+
- markdown
3640
- RSS
41+
page:
42+
- HTML
43+
- markdown
3744

3845
outputFormats:
3946
devcenter:
4047
mediaType: "application/json"
4148
baseName: "json/devcenter"
4249
isPlainText: true
50+
llms:
51+
mediaType: "text/plain"
52+
baseName: "llms"
53+
isPlainText: true
54+
permalinkable: true
55+
llms-full:
56+
mediaType: "text/plain"
57+
baseName: "llms-full"
58+
isPlainText: true
59+
permalinkable: true
60+
markdown:
61+
mediaType: "text/markdown"
62+
isPlainText: true
63+
permalinkable: true
64+
baseName: index
65+
66+
mediaTypes:
67+
text/plain:
68+
suffixes: ["txt"]
69+
text/markdown:
70+
suffixes: ["md"]
4371

4472
# Math typesetting as per 0.125.0 - https://gohugo.io/content-management/mathematics/
4573
markup:

sites/platform/config/_default/params.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ nonDocsSections:
107107
# Metadata
108108
meta:
109109
sitename: "Platform.sh User Documentation"
110-
description: Platform.sh is a second-generation Platform-as-a-Service built especially for continuous deployment. It allows you to host web applications on the cloud while making your development and testing workflows more productive.
110+
description: Platform.sh is a Cloud Application Platform built especially for continuous deployment. It allows you to host web applications on the cloud while making your development and testing workflows more productive.
111111
image: "https://docs.platform.sh/images/logos/docs_social_2021.jpg"
112112
url: "https://docs.platform.sh"
113113
twittercard:
114114
card: "summary_large_image"
115115
site: "@platformsh"
116116
title: "Platform.sh User Documentation"
117-
description: "Platform.sh is a second-generation Platform-as-a-Service built especially for continuous deployment. It allows you to host web applications on the cloud while making your development and testing workflows more productive."
117+
description: "Platform.sh is a Cloud Application Platform built especially for continuous deployment. It allows you to host web applications on the cloud while making your development and testing workflows more productive."
118118
creator: "@platformsh"
119119
image: "https://docs.platform.sh/images/logos/docs_social_2021.jpg"
120120
keywords:

0 commit comments

Comments
 (0)