Merge pull request #438 from BellumGens/adsense #139
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
# 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 bellumgens and ebleague to Azure Web Apps | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js version | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: npm install, build, and test | |
run: | | |
echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc | |
echo "//packages.infragistics.com/npm/js-licensed/:_auth=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | |
echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc | |
npm install | |
npm run build --if-present | |
- name: Zip artifact for deployment | |
run: zip release.zip ./dist/* -r | |
- name: Upload artifact for deployment job | |
uses: actions/upload-artifact@v4 | |
with: | |
name: node-app | |
path: release.zip | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: 'Production' | |
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
permissions: | |
id-token: write #This is required for requesting the JWT | |
steps: | |
- name: Download artifact from build job | |
uses: actions/download-artifact@v4 | |
with: | |
name: node-app | |
- name: Unzip artifact for deployment | |
run: unzip release.zip | |
- name: Login to Azure bellum-gens | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_3B0302B7707D4CFEBEF6A9711FCF6B42 }} | |
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_19D1A0A975A941F18E12EB9BDC079445 }} | |
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_752FA4AF4D9E4728A098E60C742B2A27 }} | |
- name: 'Deploy bellum-gens to Azure Web App' | |
id: deploy-to-webapp-bellumgens | |
uses: azure/webapps-deploy@v3 | |
with: | |
app-name: 'bellum-gens' | |
slot-name: 'Production' | |
package: ./dist/bellumgens | |
- name: Login to Azure eb-league | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_88E3F1519C854B6CBAC4EA468DBB1ED8 }} | |
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_5750E01329904536BD957F23F220D875 }} | |
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_4103DC4946854F0B82BE67B9E11E8A24 }} | |
- name: 'Deploy eb-league to Azure Web App' | |
id: deploy-to-webapp-ebleague | |
uses: azure/webapps-deploy@v3 | |
with: | |
app-name: 'eb-league' | |
slot-name: 'Production' | |
package: ./dist/ebleague |