Skip to content

Commit

Permalink
Merge pull request #22 from NucleoidAI/add-reusable-workflow
Browse files Browse the repository at this point in the history
Add reusable workflow
  • Loading branch information
canmingir authored Jun 8, 2024
2 parents 88ebb8f + 929defa commit 5eee6b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
name: Deploy
on:
push:
branches:
- main
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- run: npm ci
- run: npm run lint
- run: npm run format
- run: npm run build
- run: docker build . -t 533052815932.dkr.ecr.us-east-1.amazonaws.com/nuc:docs
- run: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 533052815932.dkr.ecr.us-east-1.amazonaws.com
- run: docker push 533052815932.dkr.ecr.us-east-1.amazonaws.com/nuc:docs
uses: NucleoidAI/actions/.github/workflows/deploy.yml@main
secrets: inherit

11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM node:16
FROM node:18

COPY build /home/app/docs/
WORKDIR /app

EXPOSE 80
COPY build build
COPY config.js config.mjs

ENTRYPOINT npx -y serve -n -p 80 /home/app/
EXPOSE 3000

ENTRYPOINT npx @nucleoidjs/http-server start build

0 comments on commit 5eee6b2

Please sign in to comment.