Add global variable for current block during render_acf_block #223
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: CSS | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Test styles | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Read .nvmrc | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
id: nvm | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- name: Get package.json from devpackages | |
run: | | |
rm package.json | |
wget https://raw.githubusercontent.com/digitoimistodude/devpackages/master/package.json | |
sed -i 's/PROJECTNAME/air-light/g' package.json | |
npm install --global | |
- name: Install stylelint packages | |
run: | | |
npm install --global \ | |
postcss@^8.4.21 \ | |
postcss-scss@^4.0.6 \ | |
stylelint@^15.1.0 \ | |
stylelint-config-recommended@^10.0.1 \ | |
stylelint-config-recommended-scss@^9.0.0 \ | |
stylelint-config-standard@^30.0.1 \ | |
stylelint-config-standard-scss@^7.0.0 \ | |
stylelint-order@^6.0.2 \ | |
stylelint-rem-over-px@^0.0.4 \ | |
stylelint-scss@^4.4.0 \ | |
@ronilaukkarinen/stylelint-a11y@^1.2.7 \ | |
@ronilaukkarinen/stylelint-declaration-strict-value@^1.9.2 \ | |
@ronilaukkarinen/stylelint-value-no-unknown-custom-properties@^4.0.1 | |
- name: Run stylelint | |
run: | | |
npx stylelint . --max-warnings 0 --config .stylelintrc | |
- name: Run gulp task devstyles in this project | |
if: | |
run: | | |
wget https://raw.githubusercontent.com/digitoimistodude/air-light/master/package.json | |
npm install | |
# Make the command visible | |
echo "Running npx gulp devstyles..." | |
npx gulp devstyles | |
# Capture the output | |
output=$(npx gulp devstyles 2>&1) | |
# Save it to a temporary file | |
echo "$output" > output.txt | |
# Check if the output contains the string "DEPRECATED" or "ERROR" or "WARNING" | |
if grep -q "DEPRECATED" output.txt || grep -q "ERROR" output.txt || grep -q "WARNING" output.txt; then | |
echo "Error found in output, failing build..." | |
exit 1 | |
else | |
echo "No errors found in output." | |
fi | |
# Remove the temporary file | |
rm output.txt |