Skip to content

Commit

Permalink
Fixed: github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiArya20 committed Dec 11, 2024
1 parent a3068e4 commit 544882d
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Learnings
name: Build and Deploy Learning App

on:
push:
branches: [ "main" ]
branches:
- main # Trigger the workflow when there is a push to the 'main' branch

jobs:
build:
runs-on: self-hosted
runs-on: self-hosted # Use your self-hosted runner

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v2 # Check out the repository

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4 # Setup Buildx (latest version)

- name: Set up Docker
uses: docker/setup-buildx-action@v4
- name: Cache Docker layers (optional but recommended for faster builds)
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Run Docker Compose
run: docker-compose up -d
- name: Build and run Docker Compose
run: |
docker-compose up -d # Run Docker Compose in detached mode

0 comments on commit 544882d

Please sign in to comment.