Skip to content

Commit

Permalink
modified github actions to push image, added gql in index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedArab1 committed Jun 15, 2024
1 parent c3a0e0f commit 16b14ea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ on:
- 'API/**'

jobs:
serverless_deploy:
docker:
runs-on: ubuntu-latest
name: serverless deploy
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- run: npm ci
- name: Deploy
uses: serverless/github-action@v3.2
with:
args: deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
MONGODB_URI: ${{secrets.MONGODB_URI}}
PORT: ${{secrets.PORT}}
-
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@v5
with:
push: true
tags: lovemonge3r3/thaqalayn-api:latest


1 change: 1 addition & 0 deletions API/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ app.get("/", (req, res) => {
</br> <h2>Visit the <a href='https://www.thaqalayn-api.net/api-docs'>SwaggerUI interface</a> to see all the API endpoints. </h2>
</br> <h3>view all books to query from (v1 - old): <a href='https://www.thaqalayn-api.net/api/allbooks'>https://www.thaqalayn-api.net/api/allbooks</a></h3>
</br> <h3>view all books to query from (v2): <a href='https://www.thaqalayn-api.net/api/v2/allbooks'>https://www.thaqalayn-api.net/api/v2/allbooks</a></h3>
</br> <h3>GraphQL API: <a href='https://www.thaqalayn-api.net/graphql'>https://www.thaqalayn-api.net/graphql</a></h3>
`,
);
});
Expand Down

0 comments on commit 16b14ea

Please sign in to comment.