Skip to content

Commit

Permalink
chore(package): stop use of yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
kubosho committed Jun 16, 2024
1 parent f7f3fac commit 93d3c83
Show file tree
Hide file tree
Showing 6 changed files with 23,313 additions and 13,342 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/WebIdentityForGitHubActions
role-session-name: github-actions-session
aws-region: ap-northeast-1
- name: Install modules
run: yarn install
run: npm install
- name: Build application
run: yarn build
run: npm run build
env:
X_MICROCMS_API_KEY: ${{ secrets.X_MICROCMS_API_KEY }}
X_MICROCMS_API_SUB_DOMAIN: ${{ secrets.X_MICROCMS_API_SUB_DOMAIN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
node-version: 18
- name: Install dependencies
run: yarn
run: npm install
- name: Release script
run: npx semantic-release
env:
Expand Down
32 changes: 7 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install modules
run: yarn install --frozen-lockfile
run: npm install
- name: Run lint
run: |
yarn script_lint
yarn style_lint
yarn markup_lint
npm run script_lint
npm run style_lint
npm run markup_lint
test:
runs-on: ubuntu-latest
Expand All @@ -44,18 +35,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install modules
run: yarn install --frozen-lockfile
run: npm install
- name: Check TypeScript code
run: yarn check_ts
run: npm run check_ts
- name: Run testing
run: yarn test
run: npm test
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ The source files for [blog.kubosho.com](blog.kubosho.com).
### Requirements

- Node.js
- Yarn

### How to viewing a preview in local environment

1. Run `yarn install` to download the package
1. Run `npm install` to download the package
2. Setup `.env` file
3. Run `yarn dev` to start the preview server
3. Run `npm run dev` to start the preview server

## Setup `.env`

Expand Down
Loading

0 comments on commit 93d3c83

Please sign in to comment.