Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Github actions tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonb927 committed Jun 10, 2024
1 parent 18b49a9 commit 77eaf6a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ name: Build and Deploy Sites
on:
push:
branches:
- 'main'
- main
pull_request:
branches:
- 'main'

env:
RUNNER_TOOL_CACHE: /toolcache
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint and Test

on:
push:
branches:
- main
pull_request:

env:
RUNNER_TOOL_CACHE: /toolcache

jobs:
lint_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Run linting
run: npm run lint:nofix
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
},
"scripts": {
"surge": "./node_modules/.bin/surge",
"lint": "eslint '*/_assets/scripts/**/*.js'",
"prettier": "prettier '*/_assets/scripts/**/*.js' --write",
"lint": "eslint --fix '*/_assets/scripts/**/*.js' && npm run prettier:write",
"lint:nofix": "eslint '*/_assets/scripts/**/*.js' && npm run prettier",
"prettier": "prettier '*/_assets/scripts/**/*.js' --check",
"prettier:write": "prettier '*/_assets/scripts/**/*.js' --write",
"brandonb.ca:deploy:dryrun": "cd brandonb.ca && JEKYLL_ENV=production gulp deploy_dryrun",
"brandonb.ca:deploy": "cd brandonb.ca && JEKYLL_ENV=production gulp deploy",
"brandonb.ca:start:dev": "cd brandonb.ca && gulp --noserviceworker",
Expand Down

0 comments on commit 77eaf6a

Please sign in to comment.