-
Notifications
You must be signed in to change notification settings - Fork 2
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 #22 from NucleoidAI/add-reusable-workflow
Add reusable workflow
- Loading branch information
Showing
2 changed files
with
11 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 |
---|---|---|
@@ -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 | ||
|
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,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 |