Add gitignore #51
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: "build" | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
name: Build Library | |
runs-on: ubuntu-latest | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Library | |
run: npm run build | |
- name: Check built CSS files for Sass variables | |
shell: bash | |
run: | | |
SASS_VARS_FOUND=$(find "dist/" -type f -name "*.css" -print0 | xargs -0 --no-run-if-empty grep -F "\$" || true) | |
if [[ -z "$SASS_VARS_FOUND" ]]; then | |
echo "All good, no Sass variables found!" | |
exit 0 | |
else | |
echo "Found $(echo "$SASS_VARS_FOUND" | wc -l | bc) Sass variables:" | |
echo "$SASS_VARS_FOUND" | |
exit 1 | |
fi | |
- name: Commit Changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "ci: build library assets" |