-
Notifications
You must be signed in to change notification settings - Fork 1.3k
51 lines (47 loc) · 1.43 KB
/
publish-docs.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
40
41
42
43
44
45
46
47
48
49
50
51
name: Publish docs
on: [workflow_dispatch]
env:
BUILD_CACHE_KEY: ${{ github.sha }}
jobs:
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Install dependencies
id: cache-keys
uses: ./.github/composite-actions/install-dependencies
outputs:
root_cache_key: ${{ steps.cache-keys.outputs.root_cache_key }}
build:
name: Build package using cache
needs: [install-dependencies]
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
with:
ref: production
- name: build
uses: ./.github/composite-actions/build-package
with:
ROOT_CACHE_KEY: ${{ needs.install-dependencies.outputs.root_cache_key }}
BUILD_CACHE_KEY: ${{ env.BUILD_CACHE_KEY }}
outputs:
root_cache_key: ${{ needs.install-dependencies.outputs.root_cache_key }}
publish-docs:
needs: [build]
name: Publish docs
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
with:
ref: production
- name: Publish docs
uses: ./.github/composite-actions/publish-docs
with:
ROOT_CACHE_KEY: ${{ needs.build.outputs.root_cache_key }}
BUILD_CACHE_KEY: ${{ env.BUILD_CACHE_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}