Skip to content

Merge pull request #647 from code-dot-org/hoc2023-prettier-src #88

Merge pull request #647 from code-dot-org/hoc2023-prettier-src

Merge pull request #647 from code-dot-org/hoc2023-prettier-src #88

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Infer node version from .nvmrc, courtesy of https://github.com/actions/setup-node/issues/32#issuecomment-539794249
- name: Read .nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION }}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Set up pages
run: mkdir pages && cp -r dist/* pages/ && cp index.html pages/
- name: Deploy Pages
uses: JamesIves/github-pages-deploy-action@v4.2.2
with:
branch: gh-pages # The branch the action should deploy to.
folder: pages # The folder the action should deploy.