File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ # From https://github.com/marketplace/actions/deploy-to-firebase-hosting
2
+
3
+ name : Deploy Docs Preview on PR
4
+
5
+ on :
6
+ pull_request :
7
+ paths :
8
+ - ' docs/**'
9
+ - ' src/**' # for api changes
10
+ - ' .github/workflows/docs.yml'
11
+
12
+ jobs :
13
+ build_and_preview :
14
+ if : ' ${{ github.event.pull_request.head.repo.full_name == github.repository }}'
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+
19
+ - name : Install Node.js
20
+ uses : actions/setup-node@v3
21
+ with :
22
+ node-version : 16
23
+
24
+ - uses : pnpm/action-setup@v2
25
+ name : Install pnpm
26
+ id : pnpm-install
27
+ with :
28
+ version : 7
29
+ run_install : false
30
+
31
+ - name : Get pnpm store directory
32
+ id : pnpm-cache
33
+ shell : bash
34
+ run : |
35
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
36
+
37
+ - uses : actions/cache@v3
38
+ name : Setup pnpm cache
39
+ with :
40
+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
41
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42
+ restore-keys : |
43
+ ${{ runner.os }}-pnpm-store-
44
+
45
+ - name : Install dependencies
46
+ run : pnpm install
47
+
48
+ - name : Build docs
49
+ run : pnpm run docs:build
50
+
51
+ - uses : FirebaseExtended/action-hosting-deploy@v0
52
+ with :
53
+ repoToken : ' ${{ secrets.GITHUB_TOKEN }}'
54
+ firebaseServiceAccount : ' ${{ secrets.FIREBASE_SERVICE_ACCOUNT_VUEFIREDOCS }}'
55
+ projectId : vuefiredocs
You can’t perform that action at this time.
0 commit comments