Skip to content

Commit

Permalink
Update node.js.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wiki-Bird authored Aug 14, 2023
1 parent da30249 commit 355da3f
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@ name: Node.js CI

on:
push:
branches: [ $default-branch ]
branches:
- main # Change 'main' to your default branch name if it's different
pull_request:
branches: [ $default-branch ]
branches:
- main # Change 'main' to your default branch name if it's different

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install

- name: Create config.json
run: echo "${{ secrets.CONFIG_JSON }}" > config.json

- name: Create firebase service account key
run: echo "${{ secrets.FIREBASE_JSON }}" > meowd-bot-firebase-adminsdk-2g9mv-5423d91b65.json

- name: Build
run: yarn build
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install

- name: Create config.json
run: echo "${{ secrets.CONFIG_JSON }}" > config.json

- name: Create firebase service account key
run: echo "${{ secrets.FIREBASE_JSON }}" > meowd-bot-firebase-adminsdk-2g9mv-5423d91b65.json

- name: Build
run: yarn build

0 comments on commit 355da3f

Please sign in to comment.