Fix deprecated workflows #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- 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@v4 | |
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 | |