-
Notifications
You must be signed in to change notification settings - Fork 612
98 lines (73 loc) · 2.02 KB
/
release-docs-and-schema.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Publish Documentation and Schema
on:
workflow_dispatch:
release:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
# The "published" event includes both releases and prereleases
# use "released" to limit triggers to official releases
types: [released]
permissions:
contents: read
pages: write
id-token: write
jobs:
schema:
name: Release Schema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Install Node dependencies
run: yarn --frozen-lockfile
- name: Build
run: yarn schema
- name: Setup Git remote
run: scripts/setup-git-ci.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add schema repo
run: |
pushd ..
git clone https://x-access-token:${GH_PAT}@github.com/vega/schema.git
popd
env:
GH_PAT: ${{ secrets.GH_PAT }}
- name: Publish schema
run: scripts/deploy-schema.sh
build:
name: Build Site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install Node dependencies
run: yarn --frozen-lockfile
- name: Prebuild website
run: yarn presite
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./site
destination: ./_site
- uses: actions/upload-pages-artifact@v1
with:
path: './_site'
deploy:
name: Deploy Site
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2