Skip to content

Update build.yml

Update build.yml #2

Workflow file for this run

name: Build and Deploy on push to latest
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Cache
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: In-For-Disaster-Analytics/REDI-portal@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: main
BRANCH: gh-pages
FOLDER: dist/spa