-
Notifications
You must be signed in to change notification settings - Fork 24
72 lines (61 loc) · 2 KB
/
msft.yaml
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
64
65
66
67
68
69
70
71
72
name: Update and deploy Microsoft Careers demo
on:
repository_dispatch:
types: [msft-deploy]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Set up Clang and LLVM
run: |
wget https://apt.llvm.org/llvm.sh
sudo bash ./llvm.sh 11
- name: Build CLI
run: |
bash ./prebuild.sh
cargo build --release
- name: Fetch and build data
working-directory: ./demo/work-at-microsoft/data
run: |
npm install
npm run build
- name: Build worker
working-directory: ./demo/work-at-microsoft/worker
env:
B2_DOMAIN: ${{ secrets.DEMO_B2_DOMAIN }}
B2_PATH: ${{ secrets.DEMO_B2_MSFT_PATH }}
run: |
export PATH="/usr/lib/llvm-11/bin:$PATH"
bash ./build.sh
- name: Build deployer
working-directory: ./deployer/cloudflare
run: |
npm install
npm run build
- name: Set up Backblaze B2 CLI
uses: wilsonzlin/setup-b2@v3
- name: Deploy worker
working-directory: ./demo/work-at-microsoft/worker
env:
B2_BUCKET: ${{ secrets.CICD_CLI_B2_BUCKET_NAME }}
B2_DOMAIN: ${{ secrets.DEMO_B2_DOMAIN }}
B2_PATH: ${{ secrets.DEMO_B2_MSFT_PATH }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_ACCOUNT_EMAIL: ${{ secrets.CF_ACCOUNT_EMAIL }}
CF_GLOBAL_API_KEY: ${{ secrets.CF_GLOBAL_API_KEY }}
CF_KV_NAMESPACE_ID: ${{ secrets.CF_KV_NAMESPACE_MSFT_ID }}
CF_WORKER_NAME: work-at-microsoft
run: |
b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID}} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }}
bash ./deploy.sh