forked from wielebenwir/commonsbooking
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 1.75 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Compile changes
on:
push:
branches:
- master
- 'release/**'
paths-ignore:
- '**.md'
- '**.txt'
jobs:
i18n-coverage:
runs-on: ubuntu-20.04
name: Check i18n coverage
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Install WP-CLI
run: |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
- name: Generate pot files
run: bin/update-pot.sh
- name: Commit changes
uses: elstudio/actions-js-build/commit@v4
with:
commitMessage: Ran wp i18n make-pot
- name: Check i18n coverage
uses: alexkiro/i18n-coverage@v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
translations-path: 'languages/*.po'
ignore-languages: 'en'
grunt:
runs-on: ubuntu-20.04
name: Run grunt and commit changes
needs: i18n-coverage
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }} # checkout the latest commit so that we can push changes
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci --legacy-peer-deps --include=dev
- name: Validate composer.json and composer.lock
run: composer validate
- name: Compile with Grunt
uses: elstudio/actions-js-build/build@v4
with:
args: build
- name: Commit changes
uses: elstudio/actions-js-build/commit@v4
with:
commitMessage: Ran grunt