api/.github/workflows/deployment.yml
Benjamin Palko 5a4339717e try this
2025-03-19 23:35:07 -04:00

36 lines
960 B
YAML

name: Deployment
on:
push:
branches:
- master
jobs:
install:
name: Install
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".tool-versions"
- name: Load node_modules cache
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: NPM
run: npm ci
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_SERVER_URL }}
username: ${{ env.GITHUB_REPOSITORY_OWNER }}
password: ${{ env.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: rusty-hearts/api:latest