-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3068e4
commit 544882d
Showing
1 changed file
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |