-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathhandler.update-evm-contracts-docs.yml
More file actions
76 lines (65 loc) · 2.75 KB
/
handler.update-evm-contracts-docs.yml
File metadata and controls
76 lines (65 loc) · 2.75 KB
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
name: Update EVM Contracts Docs
on:
push:
branches: [ "solidity-docgen", "release-ethereum-contracts-stable" ]
jobs:
update-evm-contracts-docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Show contexts
env:
HEAD_REF: ${{ github.head_ref }}
GITHUB_REF: ${{ github.ref }}
run: |
echo github.event_name: ${{ github.event_name }}
echo github.sha: ${{ github.sha }}
echo github.repository: ${{ github.repository }}
echo github.ref: "$GITHUB_REF"
echo github.head_ref: "$HEAD_REF"
echo github.base_ref: ${{ github.base_ref }}
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: "yarn"
- name: Install
run: |
yarn install --frozen-lockfile
- uses: actions/checkout@v4
with:
repository: superfluid-finance/build-scripts
path: build-scripts
- name: Create the docs
run: |
yarn workspace @superfluid-finance/ethereum-contracts docgen
# Code to upload to refs.superfluid.finance. The md files aren't useful there, need to render first
# - name: Get contracts version
# id: contracts-version
# run: |
# CONTRACTS_VERSION=`jq -r .version packages/ethereum-contracts/package.json`
# echo "::set-output name=CONTRACTS_VERSION::$CONTRACTS_VERSION"
# - name: upload docs to refs site
# uses: ./build-scripts/s3cloudfront-hosting/actions/sync
# with:
# local_build_dir: packages/ethereum-contracts/docs
# aws_region: eu-west-2
# aws_access_key_id: ${{ secrets.SITE_DEPLOYER_AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.SITE_DEPLOYER_AWS_SECRET_ACCESS_KEY }}
# s3_uri: ${{ format('{0}ethereum-contracts@{1}', secrets.SITE_DEPLOYER_AWS_S3_DOCS_URI, steps.sdk-versions.outputs.CONTRACTS_VERSION) }}
# cloudfront_distribution_id: E3JEO5R14CT8IH
- name: Update the docs repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
# Personal Access Token of the GH user accessing the docs repo
API_TOKEN_GITHUB: ${{ secrets.CI_GITHUB_API_TOKEN_FOR_DOCS_UPDATE }}
with:
# can be a directory too despite the name
source_file: packages/ethereum-contracts/docs/api/interfaces/
destination_repo: superfluid-finance/docs
destination_branch: main
destination_folder: developers/reference-documentations/evm-contracts
user_email: ghbot@superfluid.finance
# dedicated GH user with write access to the docs repo
user_name: ghactionsfordocs
use_rsync: true