fix style. x2 #480
Workflow file for this run
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: JS check (svelte-check) | |
on: | |
push: | |
paths: | |
- "js/**" | |
- "tasks/**" | |
# - "!js/src/lib/interfaces/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v35 | |
with: | |
diff_relative: true | |
path: "js" | |
files: | | |
**/*.ts | |
**/*.js | |
**/*.mjs | |
**/*.svelte | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- working-directory: js | |
run: | | |
npm ci | |
- name: Check style | |
working-directory: js | |
run: | | |
if [ -z "${{ steps.changed-files.outputs.all_changed_files }}" ] | |
then | |
echo "no changed files to test" | |
else | |
npm run prettier ${{ steps.changed-files.outputs.all_changed_files }}; | |
npm run lint ${{ steps.changed-files.outputs.all_changed_files }}; | |
git diff | head -n 100; | |
git diff --name-only --exit-code | |
fi | |
- name: Check svelte | |
working-directory: js | |
run: | | |
npm run check | |
- name: Build front | |
working-directory: js | |
run: | | |
npm run build | |
# CD of static site | |
- name: Netlify install | |
working-directory: js | |
run: | | |
npm i netlify-cli | |
- name: Netlify find out whether push to prod | |
if: endsWith(github.ref, '/main') | |
run: | | |
echo "NETLIFY_EXTRA_FLAG=--prod" >> $GITHUB_ENV | |
- name: Netlify deploy | |
working-directory: js | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: 69b9df00-bfdd-4499-bd7f-6add4d703d99 | |
run: | | |
npx netlify deploy --auth "$NETLIFY_AUTH_TOKEN" --dir ./build/ --site ${NETLIFY_SITE_ID} ${NETLIFY_EXTRA_FLAG} |