forked from paritytech/metadata-portal
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaction.yml
38 lines (32 loc) · 916 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
inputs:
token:
description: 'Github token'
required: true
runs:
using: "composite"
steps:
- name: 🔧 Install yarn
run: npm install -g yarn
shell: bash
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: ⚡ NPM Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
- name: 🔧 Install dependencies
run: yarn
shell: bash
- name: Run tests
run: yarn test
shell: bash
- name: 🚀 Deploy
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn deploy -u "GitHub Action <action@github.com>"
env:
GITHUB_TOKEN: ${{ inputs.token }}
shell: bash