Skip to content

Commit

Permalink
Workflow with the needed environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Jan 26, 2024
1 parent accf513 commit 912c34d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/main_twitch-mz-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,27 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_TWITCH_USERNAME: ${{ secrets.TWITCH_USERNAME }}
envkey_TWITCH_PASSWORD: ${{ secrets.TWITCH_PASSWORD }}
envkey_TWITCH_CHANNELS: ${{ secrets.TWITCH_CHANNELS }}
envkey_PORT: 443

- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '20.x'
node-version: '20'
cache: 'npm'

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: Zip artifact for deployment
run: zip release.zip ./* -r
run: zip -r release.zip * .env

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
Expand All @@ -49,14 +57,11 @@ jobs:
with:
name: node-app

- 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: 'twitch-mz-bot'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_5F8104D0F0DB4488AE974F3659C5C153 }}
package: .
package: release.zip

0 comments on commit 912c34d

Please sign in to comment.