-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: modify github actions and scripts
Add action step - cancel previous runs. Change deploy branch cache id. Remove flag - GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES.
- Loading branch information
Showing
6 changed files
with
19 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- uses: actions/checkout@v2 | ||
# Retrieve cache | ||
- name: Gatsby Cache | ||
|
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 |
---|---|---|
|
@@ -19,19 +19,22 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
|
||
- name: Gatsby Cache | ||
id: gatsby-ci-cache | ||
id: gatsby-deploy-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
public | ||
.cache | ||
key: ${{ runner.os }}-gatsby-ci-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-gatsby-ci- | ||
key: ${{ runner.os }}-gatsby-deploy-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-gatsby-deploy- | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
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 |
---|---|---|
|
@@ -20,6 +20,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- uses: actions/checkout@v2 | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
|
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
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 |
---|---|---|
|
@@ -7,8 +7,7 @@ | |
"scripts": { | ||
"format": "prettier --write \"**/*.{js,jsx,json,md}\"", | ||
"build": "gatsby build", | ||
"build:incremental": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true && gatsby build --log-pages", | ||
"build:incremental-windows": "set GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true&&gatsby build --log-pages", | ||
"build:incremental": "gatsby build --log-pages", | ||
"develop-noCache": "gatsby clean && gatsby develop", | ||
"develop": "gatsby develop", | ||
"lint": "npx lint-staged", | ||
|
@@ -20,14 +19,13 @@ | |
"test:e2e": "start-server-and-test develop http://localhost:8000 cy:open", | ||
"test:e2e:ci": "start-server-and-test develop http://localhost:8000 cy:run", | ||
"start": "npm run develop", | ||
"serve": "npm run build:incremental-windows && gatsby serve", | ||
"serve-noCache": "gatsby clean && npm run build:incremental-windows && gatsby serve", | ||
"serve": "npm run build:incremental && gatsby serve", | ||
"serve-noCache": "gatsby clean && npm run build:incremental && gatsby serve", | ||
"clean": "gatsby clean", | ||
"gh-pages-script": "gh-pages -d public -r https://[email protected]/researchdata-sheffield/dataviz-hub2.git", | ||
"deploy": "gatsby build && npm run gh-pages-script", | ||
"deploy-noCache": "gatsby clean && npm run deploy", | ||
"deploy:incremental": "npm run build:incremental && npm run gh-pages-script", | ||
"deploy:incremental-windows": "npm run build:incremental-windows && npm run gh-pages-script" | ||
"deploy:incremental": "npm run build:incremental && npm run gh-pages-script" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
|