Skip to content

Commit

Permalink
ci: update main_etf-line-bot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
stu01509 authored Dec 24, 2023
1 parent 8f85095 commit be354f1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/main_etf-line-bot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js app to Azure Web App - etf-line-bot

on:
Expand All @@ -20,12 +17,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Init - Set up yarn environment
run: npm install -g yarn

- name: Install dependencies
run: yarn

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Unit Test
run: yarn test

- name: Zip artifact for deployment
run: zip release.zip ./* -r
Expand All @@ -42,7 +41,7 @@ jobs:
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
Expand All @@ -51,12 +50,12 @@ jobs:

- name: Unzip artifact for deployment
run: unzip release.zip

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'etf-line-bot'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_5DE763F985CE44F9B4B74971DA82D0C2 }}
package: .
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_5DE763F985CE44F9B4B74971DA82D0C2 }}

0 comments on commit be354f1

Please sign in to comment.