Skip to content

Update dependency typescript to v5 #92

Update dependency typescript to v5

Update dependency typescript to v5 #92

Workflow file for this run

name: Build
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
build:
name: Build project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
id: nvm
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION}}
- name: Install
run: npm install
- name: Build
run: npm run build:prod
- uses: actions/cache@v2
id: restore-dependencies-cache
with:
path: |
node_modules
key: dependencies-${{ github.sha }}
test:
name: Test Project
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
id: nvm
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION}}
- uses: actions/cache@v2
id: restore-dependencies-cache
with:
path: |
node_modules
key: dependencies-${{ github.sha }}
- name: Run tests
run: npm run test
deploy:
name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: [build, test]
steps:
- uses: actions/checkout@v2
- run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
id: nvm
- uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NODE_VERSION}}
- uses: actions/cache@v2
id: restore-dependencies-cache
with:
path: |
node_modules
key: dependencies-${{ github.sha }}
- name: Log in to Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: tbhanson96
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: npm run package
- name: Deploy image
run: npm run deploy