Skip to content

Commit 6419f62

Browse files
authored
Create deploy-dev.yml
1 parent 9297892 commit 6419f62

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy Docs to Dev
2+
3+
on:
4+
push:
5+
branches: [ dev ]
6+
workflow_dispatch:
7+
8+
env:
9+
AZURE_WEBAPP_NAME: product-docs-dev
10+
NODE_VERSION: '20.x'
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-4-cores
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ env.NODE_VERSION }}
24+
cache: 'npm'
25+
26+
- name: Cache Docusaurus build artifacts
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
.docusaurus
31+
node_modules/.cache
32+
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json', '**/*.md', '**/*.mdx') }}
33+
restore-keys: |
34+
${{ runner.os }}-build-
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Build Docusaurus site
40+
run: npm run build
41+
42+
- name: Deploy to Azure Web App
43+
uses: azure/webapps-deploy@v2
44+
with:
45+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
46+
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
47+
package: build

0 commit comments

Comments
 (0)