Skip to content

Commit 73014e6

Browse files
authored
Merge pull request #41 from commitd/chrisflatley/update-build
Update build process
2 parents 0fa756a + 2cb8d33 commit 73014e6

31 files changed

+37974
-15500
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// "forwardPorts": [],
2121

2222
// Use 'postCreateCommand' to run commands after the container is created.
23-
"postCreateCommand": "yarn install",
23+
"postCreateCommand": "npm install",
2424

2525
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2626
"remoteUser": "node"

.drone.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
# Install Node
18+
- name: Set up Node
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: '16'
22+
- uses: actions/cache@v2
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
29+
# Cache the gatsby intermediates to speed up the build
30+
- uses: actions/cache@v2
31+
with:
32+
path: |
33+
example/.cache
34+
example/public
35+
key: ${{ runner.os }}-gatsby-${{ hashFiles('**/package-lock.json', '**/gatsby-node.js', '**/gatsby-config.js') }}
36+
37+
# If we every do anything with gatsby use the cache - see deploy.yaml
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Check formatting
42+
run: npm run format:check
43+
44+
- name: Build
45+
run: npm run build

.github/workflows/pr.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Check PR
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
# Install Node
16+
- name: Set up Node
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '16'
20+
- uses: actions/cache@v2
21+
with:
22+
path: ~/.npm
23+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
24+
restore-keys: |
25+
${{ runner.os }}-node-
26+
27+
# Cache the gatsby intermediates to speed up the build
28+
- uses: actions/cache@v2
29+
with:
30+
path: |
31+
example/.cache
32+
example/public
33+
key: ${{ runner.os }}-gatsby-${{ hashFiles('**/package-lock.json', '**/gatsby-node.js', '**/gatsby-config.js') }}
34+
35+
# If we every do anything with gatsby use the cache - see deploy.yaml
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Check formatting
40+
run: npm run format:check
41+
42+
- name: Build
43+
run: npm run build

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 16
15+
registry-url: https://registry.npmjs.org/
16+
# Don't use any caches to ensure a clean build
17+
- run: npm ci
18+
- run: npm run build
19+
# Push the theme to npm registry
20+
# Update github pages
21+
- run: npm run deploy
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/pre-push

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run format:check

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
public/
3+
.cache/

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
{
2-
}
1+
{}

0 commit comments

Comments
 (0)