Skip to content

Merge pull request #53 from CMU-313/bc/translate #44

Merge pull request #53 from CMU-313/bc/translate

Merge pull request #53 from CMU-313/bc/translate #44

# 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 - nodebb-f24
on:
push:
branches:
- f24
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
lint-and-test:
uses:
./.github/workflows/test.yaml
deepscan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run DeepScan
uses: deepscan/gh-action@v1
with:
token: ${{ secrets.DEEPSCAN_API_KEY }}
build-and-deploy:
if: github.repository == 'cmu-313/nodebb-f24-d-buggers'
needs: [lint-and-test, deepscan]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '20.17.0'
- name: Set up NodeBB
run: |
./nodebb setup '{"url":"https://nodebb-d-buggers.azurewebsites.net:443",
"admin:username": "admin",
"admin:password": "${{ secrets.ADMIN_PASSWORD }}",
"admin:password:confirm": "${{ secrets.ADMIN_PASSWORD }}",
"admin:email": "[email protected]",
"database": "redis",
"redis:host": "${{ secrets.REDIS_HOST }}",
"redis:port": "6379",
"redis:password": "${{ secrets.REDIS_PASSWORD }}" }'
- name: Load and install external frontend repo
run: |
npm install https://github.com/CMU-313/nodebb-frontend-f24-d-buggers.git
- name: Rebuild NodeBB
run: ./nodebb build
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'nodebb-d-buggers'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_114CAAE57AF4486D9FDF1ED38DBB21FD }}
package: .