Skip to content

Commit 9a85ce1

Browse files
authored
Merge pull request #1290 from alanpoulain/merge-2.6
Merge 2.6
2 parents b719db6 + 192fe7b commit 9a85ce1

Some content is hidden

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

75 files changed

+1647
-1168
lines changed

.github/workflows/cd.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy Website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '*.*'
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: Checkout the website
15+
uses: actions/checkout@v2
16+
with:
17+
repository: api-platform/website
18+
ref: main
19+
20+
- name: Get yarn cache directory path
21+
id: yarn-cache-dir-path
22+
run: echo "::set-output name=dir::$(yarn cache dir)"
23+
24+
- uses: actions/cache@v2
25+
id: yarn-cache
26+
with:
27+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
28+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-yarn-
31+
32+
- name: Install deps
33+
run: yarn install
34+
35+
- name: Retrieve docs
36+
run: bin/retrieve-documentation
37+
38+
- name: Build website
39+
env:
40+
GITHUB_KEY: ${{ secrets.CONTRIBUTORS_GITHUB_TOKEN }}
41+
run: yarn gatsby build
42+
43+
- name: Deploy
44+
uses: peaceiris/actions-gh-pages@v3
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./public
48+
cname: api-platform.com

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Lint
19+
uses: github/super-linter@v3
20+
env:
21+
VALIDATE_ALL_CODEBASE: false
22+
VALIDATE_EDITORCONFIG: false
23+
VALIDATE_JSCPD: false
24+
DEFAULT_BRANCH: 2.6
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- uses: actions/cache@v2
28+
with:
29+
path: ~/.cache/pip
30+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
31+
restore-keys: |
32+
${{ runner.os }}-pip-
33+
34+
- name: Install Proselint
35+
run: pip install --quiet --user proselint
36+
37+
- name: Run Proselint
38+
run: find . -name '*.md' -exec proselint {} \;

.markdownlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MD013:
2+
line_length: 400
3+
no-inline-html:
4+
allowed_elements: [a, p, img, br]

.travis.yml

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

admin/components.md

Lines changed: 71 additions & 53 deletions
Large diffs are not rendered by default.

admin/customizing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ For instance, using an autocomplete input is straightforward, [checkout the dedi
185185
API Platform is built on top of [React Admin](https://marmelab.com/react-admin/).
186186
You can use all the features provided by the underlying library with API Platform Admin, including support for [file upload](https://marmelab.com/react-admin/DataProviders.html#decorating-your-data-provider-example-of-file-upload), [authentication](https://marmelab.com/react-admin/Authentication.html), [authorization](https://marmelab.com/react-admin/Authorization.html) and deeper customization.
187187

188-
To learn more about these capabilities, refer to [the React Admin documentation](https://marmelab.com/react-admin/).
188+
To learn more about these capabilities, refer to [the React Admin documentation](https://marmelab.com/react-admin/).

admin/file-upload.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
HydraAdmin,
1414
ResourceGuesser,
1515
CreateGuesser,
16-
InputGuesser
1716
} from "@api-platform/admin";
1817
import { FileField, FileInput } from "react-admin";
1918

admin/getting-started.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ Otherwise, all you need to install API Platform Admin is a JavaScript package ma
88

99
If you don't have an existing React Application, create one using [Create React App](https://create-react-app.dev/):
1010

11-
$ yarn create react-app my-admin
11+
```console
12+
yarn create react-app my-admin
13+
```
1214

1315
Go to the directory of your project:
1416

15-
$ cd my-admin
17+
```console
18+
cd my-admin
19+
```
1620

1721
Finally, install the `@api-platform/admin` library:
1822

19-
$ yarn add @api-platform/admin
23+
```console
24+
yarn add @api-platform/admin
25+
```
2026

2127
## Creating the Admin
2228

@@ -59,7 +65,10 @@ nelmio_cors:
5965
6066
Clear the cache to apply this change:
6167
62-
$ docker-compose exec php bin/console cache:clear --env=prod
68+
```console
69+
docker-compose exec php \
70+
bin/console cache:clear --env=prod
71+
```
6372

6473
Your new administration interface is ready! Type `yarn start` to try it!
6574

admin/images/required-field.png

2.08 KB
Loading
5.74 KB
Loading

0 commit comments

Comments
 (0)