Skip to content

Commit

Permalink
fix(workflow): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Oct 9, 2024
1 parent 37578c4 commit cf3c3e4
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: 🪚 Build app
run: |
npm ci
npm run build -- --mode production
- name: 🏷️ Get tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- uses: oven-sh/setup-bun@v2

- name: 🔑 Login Docker
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}

- name: 🐳 Build Docker image
- name: Build 🐳 🐳 🐳
run: |
bun i
bunx --bun vite build client --emptyOutDir --outDir '../server/public'
IMAGE_ID=ghcr.io/${{ github.repository }}
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker build -t $IMAGE_ID:${{ steps.tag.outputs.tag }} -t $IMAGE_ID:latest .
- name: 🏷️ Get tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: 📦 Push Docker image
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}
Expand Down Expand Up @@ -89,7 +84,7 @@ jobs:
restart: ${{ env.DEPLOYMENT }}

notify:
name: 📢 Notify in mattermost channel
name: 📢📢📢 Notify in mattermost channel
needs: deploy
if: always()
runs-on: ubuntu-latest
Expand Down

0 comments on commit cf3c3e4

Please sign in to comment.