forked from CMU-313/cmu-313-f24-nodebb-f24-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.83 KB
/
f24_nodebb-teamtbd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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-teamtbd
on:
push:
branches:
- f24
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
lint-and-test:
uses:
./.github/workflows/test.yaml
build-and-deploy:
if: github.repository == 'CMU-313/nodebb-f24-team-tbd-1'
needs: lint-and-test
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-teamtbd.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: Clone frontend repo as a subdirectory
run: |
git clone https://github.com/CMU-313/nodebb-frontend-f24-team-tbd-1.git
- name: Install frontend dependencies
run: |
npm install ./nodebb-frontend-f24-team-tbd-1
./nodebb build
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'nodebb-teamtbd'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_DF2C6F2F58874B1D9E66D7811697249C }}
package: .