-
Notifications
You must be signed in to change notification settings - Fork 11
94 lines (71 loc) · 2.46 KB
/
linting.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Linting
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
types: [synchronize, opened, reopened, ready_for_review]
# Colorized output from Python and Ansible tools
env:
PY_COLORS: '1'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Install jsonlint
run: sudo apt-get install --yes jsonlint
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Install Jekyll
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
bundle update --bundler
- name: Build site
run: bundle exec jekyll build
- name: Create version.json
run: 'echo "{ \"version\": \"${{ env.RELEASE_VERSION }}\", \"git_ref\": \"$GITHUB_SHA\"}" > ./_site/version.json'
- name: Rename folder
run: mv _site public
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Create NL print portal
run: |
cd print-portal
npm install -g @vue/cli-service
npm install --production=false
npm run build --if-present
env:
NODE_ENV: production
- name: Copy print portal to public
run: mv print-portal/dist public/nl/print
- name: Remake for EN print portal
run: |
sed -i 's/nl\/print/en\/print/g' print-portal/vue.config.js
- name: Create EN print portal
run: |
cd print-portal
npm run build --if-present
env:
NODE_ENV: production
- name: Copy print portal to public
run: mv print-portal/dist public/en/print
- name: Copy fonts
run: cp -R public/nl/print/assets/fonts public/assets/
- name: Copy img
run: cp -R public/nl/print/assets/img public/assets/
- name: Copy auth redirect script
run: cp -R auth.php public/app/auth.php
- name: Copy auth2 redirect script
run: cp -R auth2.php public/app/auth2.php
- name: Lint json files
run: find . -size +2c \( -name *.json -o -name *.json.v* \) -not -path "./print-portal/node_modules/*" | xargs jsonlint-php