Skip to content

Commit b466c72

Browse files
committed
Merge 3.1
2 parents 52f3434 + 85ec7ed commit b466c72

20 files changed

+59
-41
lines changed

.github/workflows/cd.yml

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,18 @@ jobs:
2828
restore-keys: |
2929
${{ runner.os }}-yarn-
3030
31-
- name: Install deps
32-
run: yarn install
3331
34-
- name: Retrieve docs
35-
run: bin/retrieve-documentation
36-
37-
- name: Build website
38-
env:
39-
GITHUB_KEY: ${{ secrets.CONTRIBUTORS_GITHUB_TOKEN }}
40-
NODE_OPTIONS: --openssl-legacy-provider
41-
run: yarn gatsby build
32+
- name: Setup Hugo
33+
uses: peaceiris/actions-hugo@v2
34+
with:
35+
hugo-version: '0.119.0'
36+
extended: true
4237

43-
- name: Deploy
44-
uses: peaceiris/actions-gh-pages@v3
38+
- name: Install php
39+
uses: shivammathur/setup-php@v2
4540
with:
46-
github_token: ${{ secrets.GITHUB_TOKEN }}
47-
publish_dir: ./public
48-
cname: api-platform.com
41+
php-version: '8.2'
42+
tools: phive
4943

5044
- name: Auth gcloud
5145
uses: google-github-actions/auth@v1
@@ -54,6 +48,30 @@ jobs:
5448

5549
- name: 'Set up Cloud SDK'
5650
uses: 'google-github-actions/setup-gcloud@v1'
57-
58-
- name: Deploy on bucket
59-
run: gsutil -m rsync -d -r ./public gs://api-platform-website-v3/
51+
52+
- name: Compute documentation
53+
run: |
54+
git clone https://github.com/api-platform/docs-website
55+
cd docs-website
56+
npm install
57+
# fetches api-platform/docs
58+
bash tools/get-docs.sh
59+
# fetches api-platform/core for reference and guides
60+
bash tools/get-core-docs.sh
61+
# builds the config/_default/menu.toml according to the outline.yaml from api-platform/docs
62+
node tools/menu.mjs
63+
# build our tailwind theme
64+
hugo --minify
65+
gsutil -q -m rsync -d -r ./public gs://api-platform-website-v3/
66+
# This need to move to website
67+
# env:
68+
# GITHUB_KEY: ${{ secrets.CONTRIBUTORS_GITHUB_TOKEN }}
69+
# NODE_OPTIONS: --openssl-legacy-provider
70+
71+
# - name: Deploy
72+
# uses: peaceiris/actions-gh-pages@v3
73+
# with:
74+
# github_token: ${{ secrets.GITHUB_TOKEN }}
75+
# publish_dir: ./public
76+
# cname: api-platform.com
77+

core/content-negotiation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Using the raw JSON or raw XML formats is discouraged, prefer using JSON-LD inste
99

1010
API Platform also supports [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) the JSON:API [`PATCH`](https://tools.ietf.org/html/rfc5789) formats, as well as [Problem Details (RFC 7807)](https://tools.ietf.org/html/rfc7807), Hydra and JSON:API error formats.
1111

12-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/formats?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Formats screencast"><br>Watch the Formats screencast</a></p>
12+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/formats?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="Formats screencast"><br>Watch the Formats screencast</a></p>
1313

1414
API Platform will automatically detect the best resolving format depending on:
1515

core/extending-jsonld-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## JSON-LD
44

5-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/json-ld?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="JSON-LD screencast"><br>Watch the JSON-LD screencast</a></p>
5+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/json-ld?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="JSON-LD screencast"><br>Watch the JSON-LD screencast</a></p>
66

77
API Platform provides the possibility to extend the JSON-LD context of properties. This allows you to describe JSON-LD-typed
88
values, inverse properties using the `@reverse` keyword and you can even overwrite the `@id` property this way. Everything you define
@@ -63,7 +63,7 @@ Note that you do not have to provide the `@id` attribute. If you do not provide
6363

6464
## Hydra
6565

66-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/hydra?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Hydra screencast"><br>Watch the Hydra screencast</a></p>
66+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/hydra?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="Hydra screencast"><br>Watch the Hydra screencast</a></p>
6767

6868
It's also possible to replace the Hydra context used by the documentation generator:
6969

core/extending.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ For instance, if you want to send a mail after a resource has been persisted, bu
3535

3636
To replace existing API Platform services with your decorators, [check out how to decorate services](https://symfony.com/doc/current/service_container/service_decoration.html).
3737

38-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform-security/service-decoration?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Service Decoration screencast"><br>Watch the Service Decoration screencast</a></p>
38+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform-security/service-decoration?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="Service Decoration screencast"><br>Watch the Service Decoration screencast</a></p>

core/filters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ By default, all filters are disabled. They must be enabled explicitly.
1212
When a filter is enabled, it automatically appears in the [OpenAPI](openapi.md) and [GraphQL](graphql.md) documentations.
1313
It is also automatically documented as a `hydra:search` property for JSON-LD responses.
1414

15-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/filters?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Filtering and Searching screencast"><br>Watch the Filtering & Searching screencast</a></p>
15+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/filters?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="Filtering and Searching screencast"><br>Watch the Filtering & Searching screencast</a></p>
1616

1717
## Doctrine ORM and MongoDB ODM Filters
1818

core/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ and what [JSON-LD](https://json-ld.org/) and [Hydra](https://www.hydra-cg.com/)
3030

3131
## Mapping the Entities
3232

33-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/api-resource?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Create an API Resource screencast"><br>Watch the Create an API Resource screencast</a></p>
33+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/api-resource?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="Create an API Resource screencast"><br>Watch the Create an API Resource screencast</a></p>
3434

3535
API Platform is able to automatically expose entities mapped as "API resources" through a REST API supporting CRUD
3636
operations.

core/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ This bundle is extensively tested (unit and functional). The [`Fixtures/` direct
4343

4444
## Screencasts
4545

46-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/tracks/rest?cid=apip#api-platform"><img src="../distribution/images/symfonycasts-player.png" alt="SymfonyCasts, API Platform screencasts"></a></p>
46+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/tracks/rest?cid=apip#api-platform"><img src="/docs/distribution/images/symfonycasts-player.png" alt="SymfonyCasts, API Platform screencasts"></a></p>
4747

4848
The easiest and funniest way to learn how to use API Platform is to watch [the more than 60 screencasts available on SymfonyCasts](https://symfonycasts.com/tracks/rest?cid=apip#api-platform)!

core/jwt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The tokens are signed by the server's key, so the server is able to verify that
77
88
API Platform allows to easily add a JWT-based authentication to your API using [LexikJWTAuthenticationBundle](https://github.com/lexik/LexikJWTAuthenticationBundle).
99

10-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/symfony-rest4/json-web-token?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="JWT screencast"><br>Watch the LexikJWTAuthenticationBundle screencast</a></p>
10+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/symfony-rest4/json-web-token?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="JWT screencast"><br>Watch the LexikJWTAuthenticationBundle screencast</a></p>
1111

1212
## Installing LexikJWTAuthenticationBundle
1313

core/openapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ API Platform natively supports the [OpenAPI](https://www.openapis.org/) API spec
44

55
![Screenshot](../distribution/images/swagger-ui-1.png)
66

7-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/open-api-spec?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="OpenAPI screencast"><br>Watch the OpenAPI screencast</a></p>
7+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/open-api-spec?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="OpenAPI screencast"><br>Watch the OpenAPI screencast</a></p>
88

99
The specification of the API is available at the `/docs.json` path.
1010
By default, OpenAPI v3 is used.

core/operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
API Platform relies on the concept of operations. Operations can be applied to a resource exposed by the API. From
44
an implementation point of view, an operation is a link between a resource, a route and its related controller.
55

6-
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/operations?cid=apip"><img src="../distribution/images/symfonycasts-player.png" alt="Operations screencast"><br>Watch the Operations screencast</a></p>
6+
<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/operations?cid=apip"><img src="/docs/distribution/images/symfonycasts-player.png" alt="Operations screencast"><br>Watch the Operations screencast</a></p>
77

88
API Platform automatically registers typical [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations
99
and describes them in the exposed documentation (Hydra and Swagger). It also creates and registers routes corresponding

0 commit comments

Comments
 (0)