-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π Features - Update to use new version of eslint - Use typescript by default - Remove gulp as orchestrator in favor of simple node scripts - Use `npm` as package manager π Improvements - Improve deployment docs and workflows - Update modules π Fixes -
- Loading branch information
1 parent
d5d7925
commit 6702cb3
Showing
24 changed files
with
12,182 additions
and
10,937 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
|
||
# Deploy the site to Surge on a push to the 'main' branch | ||
|
||
name: Deploy Surge | ||
name: Deploy Github Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
NODE: 18 | ||
SURGE_DOMAIN: | ||
PUBLIC_URL: ${{ vars.PUBLIC_URL }} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ env.NODE }} | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE }} | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
|
@@ -45,34 +43,30 @@ jobs: | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }} | ||
|
||
- name: Install | ||
run: yarn install | ||
run: npm install | ||
|
||
- name: Build | ||
run: yarn build | ||
run: npm run all:build | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Restore node_modules | ||
uses: actions/cache@v3 | ||
id: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
|
||
- name: Restore dist cache | ||
uses: actions/cache@v3 | ||
id: cache-dist | ||
with: | ||
path: dist | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }} | ||
|
||
- name: Deploy to Surge | ||
run: | | ||
cp ./dist/index.html ./dist/200.html | ||
node_modules/surge/lib/cli.js ./dist ${{ env.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }} | ||
- name: Deploy π | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
clean: true | ||
single-commit: true | ||
folder: /dist |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,21 +18,20 @@ on: | |
- ready_for_review | ||
|
||
env: | ||
NODE: 18 | ||
NODE: 20 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
prep: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ env.NODE }} | ||
uses: actions/setup-node@v3 | ||
|
@@ -47,15 +46,15 @@ jobs: | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
|
||
- name: Install | ||
run: yarn install | ||
run: npm run install | ||
|
||
lint: | ||
needs: prep | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ env.NODE }} | ||
uses: actions/setup-node@v3 | ||
|
@@ -70,18 +69,18 @@ jobs: | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
|
||
- name: Install | ||
run: yarn install | ||
run: npm run install | ||
|
||
- name: Lint | ||
run: yarn lint | ||
run: npm run lint | ||
|
||
test: | ||
needs: prep | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ env.NODE }} | ||
uses: actions/setup-node@v3 | ||
|
@@ -96,7 +95,7 @@ jobs: | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
|
||
- name: Install | ||
run: yarn install | ||
run: npm run install | ||
|
||
- name: Test | ||
run: yarn test | ||
run: npm run test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18 | ||
20 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"extends": ["@parcel/config-default"], | ||
"reporters": ["...", "@parcel/reporter-bundle-analyzer"] | ||
"reporters": ["...", "@parcel/reporter-bundle-analyzer"], | ||
"resolvers": ["parcel-resolver-ignore", "..."] | ||
} |
Oops, something went wrong.