-
Notifications
You must be signed in to change notification settings - Fork 107
70 lines (58 loc) · 1.65 KB
/
spec.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
name: Generate mobile-wallet-adapter specification
on:
push:
branches: [ main ]
paths: [ '.github/**', 'spec/**' ]
pull_request:
branches: [ main ]
paths: [ '.github/**', 'spec/**' ]
defaults:
run:
working-directory: spec
jobs:
generate-spec:
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: 'development'
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: set up PlantUML
run: ./setup-plantuml.sh
working-directory: .github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
working-directory: spec
- name: Generate jekyll site
run: bundle exec jekyll build
working-directory: spec
# Upload spec jekyll site to workflow artifacts
- uses: actions/upload-artifact@v4
with:
name: spec-jekyll-site
path: spec/_site/*
if-no-files-found: error
retention-days: 1
publish-to-gh-pages:
runs-on: ubuntu-latest
needs: generate-spec
concurrency: publish-to-gh-pages
if: ${{ github.event_name == 'push' }}
steps:
- name: Update spec jekyll site
uses: solana-mobile/gha-commit-artifact-to-branch@v2
with:
token: ${{ secrets.UPDATE_GITHUB_PAGES_TOKEN }}
branch: gh-pages
artifact-name: spec-jekyll-site
dest: spec
commit-message: 'Update spec jekyll site'