Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ on:

permissions:
contents: read
checks: write

jobs:
build:
permissions:
checks: write
contents: read

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
persist-credentials: false

- name: Fetch styles
run: |
Expand All @@ -24,7 +29,7 @@ jobs:
unzip Microsoft.zip -d .github/styles

- name: Check
uses: errata-ai/vale-action@reviewdog
uses: errata-ai/vale-action@85f9f7f2c5f449ac0ae5b66662961bae3f77ca6a
with:
reporter: github-check
fail_on_error: false
Expand All @@ -37,9 +42,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
fetch-depth: 0
persist-credentials: false

- name: Find files to check
id: links
Expand Down Expand Up @@ -82,7 +88,7 @@ jobs:

- name: Setup Node.js
if: steps.links.outputs.count != '0'
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
cache: npm
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
Expand All @@ -20,10 +18,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
cache: npm
Expand All @@ -35,12 +35,16 @@ jobs:
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b
with:
path: src/.vitepress/dist

deploy:
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -49,4 +53,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
16 changes: 12 additions & 4 deletions .github/workflows/translate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Update translations

on:
pull_request_target:
pull_request:
paths:
- '_translations/**'
push:
Expand All @@ -10,31 +10,39 @@ on:
- '_translations/**'
- 'src/**'

permissions:
contents: write
jobs:
update-docs:
name: Update docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
token: ${{ secrets.YIISOFT_GITHUB_TOKEN || github.token }}
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false

- name: Prepare po4a configuration
run: _translations/prepare-config.sh

- name: Use po4a
uses: vjik/docker-run@v1
uses: vjik/docker-run@623c9adf6ee99fc8f9fa4e3b0b6b0c25859b69ee
with:
image: ghcr.io/yiisoft-contrib/po4a:0.74
volumes: ${{ github.workspace }}:/src
workdir: /src/_translations
command: po4a po4a.conf && po4a po4a.conf

- name: Configure Git credentials
env:
GH_TOKEN: ${{ secrets.YIISOFT_GITHUB_TOKEN || github.token }}
run: git config --global credential.helper '!f() { echo username=x-access-token; echo password=$GH_TOKEN; }; f'

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403
with:
commit_message: Update translation
file_pattern: '_translations src'
Loading