Skip to content

Commit

Permalink
fix: updated github pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzzirfan committed Nov 22, 2023
1 parent fa32868 commit 1677aa5
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/serverless-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package
name: Serverles app CI/CD

on:
release:
types: [created]
push:
branches:
- main
- master

jobs:
build:
Expand All @@ -15,19 +17,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
- run: npm install
- run: npm build
- run: npm run sls:deploy
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID}}

0 comments on commit 1677aa5

Please sign in to comment.