rss-reader/.github/workflows/main.yml

61 lines
1.5 KiB
YAML
Raw Normal View History

2021-07-17 14:21:58 +00:00
on:
push:
#branches:
# master
pull_request:
env:
NODE_VERSION: 16
jobs:
setup:
runs-on: ubuntu-latest
name: Setup
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
id: node-setup
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v2
id: cache-restore
with:
path: |
.yarn
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
- name: Install dependencies
if: steps.cache-restore.outputs.cache-hit != 'true'
2021-07-17 14:23:22 +00:00
run: yarn
2021-07-17 14:21:58 +00:00
build:
runs-on: ubuntu-latest
name: Build
needs: setup
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
id: node-setup
with:
node-version: ${{ env.NODE_VERSION }}
2021-07-17 14:44:05 +00:00
- name: Yarn cache
uses: actions/cache@v2
2021-07-17 14:26:49 +00:00
id: cache-restore
with:
path: |
.yarn
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
2021-07-17 14:44:05 +00:00
- name: Parcel cache
uses: actions/cache@v2
id: cache-restore
with:
path: |
.parcel-cache
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}-parcel
2021-07-17 14:28:35 +00:00
- run: |
2021-07-17 14:30:16 +00:00
yarn
yarn build
2021-07-17 14:44:05 +00:00
- name: Build Artifacts
uses: actions/upload-artifacts@v2
with:
name: build-artifacts
path: dist