Skip to content

Merge pull request #347 from BellumGens/dependabot/npm_and_yarn/ejs-3… #50

Merge pull request #347 from BellumGens/dependabot/npm_and_yarn/ejs-3…

Merge pull request #347 from BellumGens/dependabot/npm_and_yarn/ejs-3… #50

# 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
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '18.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:ssr
- name: predeploy shell
shell: bash
run: |
cd dist/bellumgens/server
for filename in *; do
mv "${filename}" "../${filename}"
done
cd ../browser/en
mv "web.config" "../../web.config"
cd ../../../ebleague/server
for filename in *; do
mv "${filename}" "../${filename}"
done
cd ../browser/en
mv "web.config" "../../web.config"
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: bellum-gens
path: dist/
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: bellum-gens
- name: 'Deploy bellumgens to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-bellumgens
with:
app-name: 'bellumgens'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1035F3F6F938425B9A1529BCC7188625 }}
package: ./bellumgens
- name: 'Deploy ebleague to Azure Web App'
uses: azure/webapps-deploy@v2
id: deploy-to-ebleague
with:
app-name: 'ebleague'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_DE98D6F3CA68449BA8D84372248AA037 }}
package: ./ebleague