-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #698 from hngprojects/team-deploy
Team deploy
- Loading branch information
Showing
5 changed files
with
48 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build and Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./docker/development/Dockerfile | ||
push: true | ||
tags: hngdevops/nextjs-boilerplate:dev |
2 changes: 1 addition & 1 deletion
2
.github/workflows/ci-build-lint-test.yml → .github/workflows/build-lint-test.yml
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,4 +1,4 @@ | ||
name: CI Build, Lint, and Test | ||
name: Build, Lint, and Test | ||
|
||
on: | ||
pull_request | ||
|
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
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
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,11 +1,10 @@ | ||
name: Team Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- team-deploy | ||
paths-ignore: | ||
- .github/workflows/** | ||
workflow_run: | ||
workflows: ["Build and Push"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
team_deployment: | ||
|
@@ -17,14 +16,10 @@ jobs: | |
|
||
environment: | ||
name: ${{ matrix.environment }} | ||
url: ${{ secrets.URL }} | ||
|
||
steps: | ||
- name: Deploy to ${{ matrix.environment }} environment | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
./deploy_${{ matrix.environment }}.sh | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Print Environment | ||
run: echo "Current environment is ${{ matrix.environment }}" |