forked from zumasys/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.22 KB
/
deploy.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
name: Deploy to Azure
on:
push:
branches:
- master
env:
NODE_VERSION: "14.x"
SOURCE_DIR: "site/.vuepress/dist"
VUE_APP_GITHUB_CLIENT_ID: ${{ secrets.VUE_APP_GITHUB_CLIENT_ID }}
VUE_APP_GITHUB_CLIENT_SECRET: ${{ secrets.VUE_APP_GITHUB_CLIENT_SECRET }}
VUE_APP_GOOGLE_TAG_MANAGER: ${{ secrets.VUE_APP_GOOGLE_TAG_MANAGER }}
VUE_APP_ALGOLIA_API_KEY: ${{ secrets.VUE_APP_ALGOLIA_API_KEY }}
VUE_APP_ALGOLIA_INDEX_NAME: ${{ secrets.VUE_APP_ALGOLIA_INDEX_NAME }}
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: "Get latest code"
uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ env.NODE_VERSION }}
- name: "npm install, build, and test"
run: |
# Build and test the project
cd site
npm install
npm run build --if-present
npm run test --if-present
- name: "Deploy to Azure Storage"
uses: lauchacarro/Azure-Storage-Action@v1.0
with:
enabled-static-website: "true"
folder: ${{ env.SOURCE_DIR }}
connection-string: ${{ secrets.CONNECTION_STRING }}