-
Notifications
You must be signed in to change notification settings - Fork 906
98 lines (82 loc) · 2.62 KB
/
publish-gh-pages.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 GitHub Pages
on:
workflow_dispatch:
branches:
- master
- maintenance/*
push:
branches:
- master
- maintenance/*
env:
# Among other things, opts out of Turborepo telemetry
# See https://consoledonottrack.com/
DO_NOT_TRACK: '1'
# Some tasks slow down considerably on GitHub Actions runners when concurrency is high
TURBO_CONCURRENCY: 1
# Enables Turborepo Remote Caching.
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
compile-v1-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: maintenance/v1.x
- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
- name: Compile docs
run: pnpm compile:docs
- name: Assemble Deploy Directory
run: |
mkdir -p .ghpages-deploy/v1.x
mv ./doc/* .ghpages-deploy/v1.x
- uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: ghpages-deploy-artifacts-v1-docs
path: .ghpages-deploy
retention-days: 1
compile-github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
- name: Compile
run: pnpm turbo run compile:typedefs compile:ghpages --concurrency=${TURBO_CONCURRENCY:-1}
env:
REACT_EXAMPLE_APP_BASE_PATH: /solana-web3.js/example/
- name: Assemble Deploy Directory
run: |
mkdir -p .ghpages-deploy
mv ./examples/react-app/dist/ .ghpages-deploy/example/
mv ./docs/* .ghpages-deploy/
- uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: ghpages-deploy-artifacts
path: .ghpages-deploy
retention-days: 1
publish:
runs-on: ubuntu-latest
needs: [compile-v1-docs, compile-github-pages]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
- uses: actions/download-artifact@v4
with:
path: .ghpages-deploy
pattern: ghpages-deploy-artifacts*
merge-multiple: true
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .ghpages-deploy