Skip to content

Commit 6899139

Browse files
committed
fix(lint): add permissions to CD, lint & bump GA images
1 parent 83fd0ba commit 6899139

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

.github/workflows/cd.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1+
---
12
name: Deploy Website
23

34
on:
45
push:
56
branches:
67
- main
7-
- '*.*'
8+
- "*.*"
9+
10+
permissions:
11+
contents: read
12+
id-token: read
13+
actions: read
14+
checks: write
15+
deployments: write
16+
pull-requests: read
817

918
jobs:
1019
deploy:
@@ -28,57 +37,52 @@ jobs:
2837
restore-keys: |
2938
${{ runner.os }}-yarn-
3039
31-
3240
- name: Setup Hugo
33-
uses: peaceiris/actions-hugo@v2
41+
uses: peaceiris/actions-hugo@v3
3442
with:
35-
hugo-version: '0.134.2'
43+
hugo-version: "0.134.2"
3644
extended: true
3745

3846
- name: Install php
3947
uses: shivammathur/setup-php@v2
4048
with:
41-
php-version: '8.2'
49+
php-version: "8.2"
4250
tools: phive
4351

4452
- name: Auth gcloud
45-
uses: google-github-actions/auth@v1
53+
uses: google-github-actions/auth@v2
4654
with:
4755
credentials_json: ${{ secrets.BUCKET_CREDS }}
48-
49-
- name: 'Set up Cloud SDK'
50-
uses: 'google-github-actions/setup-gcloud@v1'
56+
57+
- name: Set up Cloud SDK
58+
uses: google-github-actions/setup-gcloud@v2
5159

5260
- name: Clone website
53-
uses: actions/checkout@v2
61+
uses: actions/checkout@v4
5462
with:
5563
repository: api-platform/docs-website
5664
path: docs-website
65+
5766
- name: Install javascript packages
5867
working-directory: docs-website
5968
run: npm install
69+
6070
- name: Fetch API Platform docs
6171
working-directory: docs-website
6272
run: tools/get-docs.sh
73+
6374
- name: Fetch API Platform references and guides
6475
working-directory: docs-website
6576
run: tools/get-core-docs.sh
66-
- name: Build menu
77+
78+
- name: Build menu
6779
working-directory: docs-website
6880
run: node tools/menu.mjs
81+
6982
- name: Hugo
7083
working-directory: docs-website
7184
run: hugo --minify
85+
7286
- name: Deploy
7387
working-directory: docs-website
7488
run: gsutil -q -m rsync -d -r ./public gs://api-platform-website-v3/
75-
# This need to move to website
76-
# env:
77-
# GITHUB_KEY: ${{ secrets.CONTRIBUTORS_GITHUB_TOKEN }}
78-
# NODE_OPTIONS: --openssl-legacy-provider
79-
# - name: Deploy
80-
# uses: peaceiris/actions-gh-pages@v3
81-
# with:
82-
# github_token: ${{ secrets.GITHUB_TOKEN }}
83-
# publish_dir: ./public
84-
# cname: api-platform.com

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
---
12
name: Lint
23

34
on:
45
push:
56
pull_request:
67

7-
permissions: {}
8+
permissions:
9+
contents: read
810

911
jobs:
1012
build:
@@ -23,7 +25,7 @@ jobs:
2325
fetch-depth: 0
2426

2527
- name: Lint
26-
uses: super-linter/super-linter@v7.1.0
28+
uses: super-linter/super-linter@v7
2729
env:
2830
VALIDATE_ALL_CODEBASE: false
2931
VALIDATE_EDITORCONFIG: false

0 commit comments

Comments
 (0)