-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (60 loc) · 1.98 KB
/
deploy-docs.yml
File metadata and controls
73 lines (60 loc) · 1.98 KB
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
73
name: "Build and Deploy Docs to Firebase Hosting"
on:
push:
branches:
- main
paths:
- "docs/user-docs/**"
env:
PROJECT_ID: "benefit-decision-toolkit-play"
FIREBASE_TARGET: "bdt-docs"
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
# -------------------------
# Install Python & MKDocs
# -------------------------
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Cache Python dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('docs/user-docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/user-docs/requirements.txt
- name: Build MKDocs site
working-directory: docs/user-docs
run: mkdocs build
# -------------------------
# Install Node & Firebase CLI
# -------------------------
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install Firebase CLI
run: npm install -g firebase-tools
# -------------------------
# Authenticate to Firebase
# -------------------------
- id: auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/1034049717668/locations/global/workloadIdentityPools/github-actions-google-cloud/providers/github
service_account: cicd-build-deploy-api@benefit-decision-toolkit-play.iam.gserviceaccount.com
project_id: ${{ env.PROJECT_ID }}
- name: Deploy Docs to Firebase Hosting
run: firebase deploy --only hosting:${{ env.FIREBASE_TARGET }}