-
-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (43 loc) · 1.37 KB
/
publish.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
name: Publish
on:
push:
branches:
- main
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
# Install Landscape2
- name: Install Landscape2
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/cncf/landscape2/releases/download/v0.10.0/landscape2-installer.sh | sh
# Build JSON Schema Landscape
- name: Build Landscape
env:
GITHUB_TOKENS: ${{ secrets.GITHUB_TOKEN }}
CRUNCHBASE_API_KEY: ${{ secrets.CRUNCHBASE_API_KEY }}
run: |
landscape2 build \
--data-file landscape.yml \
--settings-file settings.yml \
--guide-file guide.yml \
--logos-path logos \
--output-dir build
- name: Deploying to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build --project-name=${{ vars.CLOUDFLARE_PAGES_PROJECT_NAME }}
if: github.repository_owner == 'json-schema-org'