Skip to content

Commit

Permalink
chore: [FOLIO-3] 멀티 플랫폼 빌드를 위한 워크플로우 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
YerangPark committed Aug 23, 2024
1 parent 5ee7bcc commit 217abdf
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,9 @@ jobs:
with:
node-version: '20'

- name: Install dependancies
- name: Install dependencies
run: npm install

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: your-repo/frontend-folio:latest
platforms: linux/amd64,linux/arm64

- name: Build project
run: npm run build

Expand All @@ -52,11 +36,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}

- name: Build Docker image
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/frontend-folio:latest .

- name: Push Docker image to DockerHub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/frontend-folio:latest
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/frontend-folio:latest
platforms: linux/amd64,linux/arm64

deploy:
runs-on: ubuntu-latest
Expand All @@ -77,4 +63,4 @@ jobs:
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/frontend-folio:latest
docker stop frontend-folio || true
docker rm frontend-folio || true
docker run -d -p 80:3000 --name frontend-folio ${{ secrets.DOCKERHUB_USERNAME }}/frontend-folio:latest
docker run -d -p 80:3000 --name frontend​⬤

0 comments on commit 217abdf

Please sign in to comment.