Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
Updating and testing deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Feb 20, 2024
1 parent 7a3689e commit f72aa31
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 144 deletions.
51 changes: 29 additions & 22 deletions .github/workflows/build-deploy-linkcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build API page
uses: seeebiii/redoc-cli-github-action@v10
with:
args: "bundle --options.disableGoogleFont=true content/api/openapi.yaml -o public/api/index.html"

# - name: Push to deploy branch
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./public
# publish_branch: deploy
# - name: checkout deploy
# run: git checkout -f deploy

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
Expand All @@ -28,37 +42,30 @@ jobs:
- name: Build Hugo site
run: hugo --minify

- name: Build API page
uses: seeebiii/redoc-cli-github-action@v10
with:
args: "bundle --options.disableGoogleFont=true content/api/openapi.yaml -o public/api/index.html"

- name: Push to deploy branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: deploy

- name: Install linkinator
run: npm install -g linkinator

- name: checkout deploy
run: git checkout -f deploy

- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --delete --exclude=".git" --exclude=".github"
path: public/
remote_path: /home/${{ secrets.DOCS_USER }}/trueblocks-website
remote_host: ${{ secrets.NEW_SERVER_HOST }}
remote_user: ${{ secrets.DOCS_USER }}
remote_key: ${{ secrets.DOCS_PRIVATE_KEY }}
remote_path: /home/docs/Websites/trueblocks.io
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.HOST_USER }}
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}

- name: Install linkinator
run: npm install -g linkinator

- name: check links
run: linkinator -r index.html docs/ papers/ data-model/ api/ --skip localhost:23456 --skip tokenomics.io --skip etherscan.io --skip https://twitter.com/trueblocks --skip intro

- name: Test Failure
uses: rjstone/discord-webhook-notify@v1
if: failure()
with:
severity: error
details: Test Failed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

- name: Report job status
run: |
echo "This job's status is ${{ job.status }}"
22 changes: 7 additions & 15 deletions .github/workflows/build-deploy-linkcheck.yaml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
publish_dir: ./public
publish_branch: deploy

- name: Install linkinator
run: npm install -g linkinator

- name: checkout deploy
run: git checkout -f deploy

Expand All @@ -51,22 +48,17 @@ jobs:
with:
switches: -avzr --delete --exclude=".git" --exclude=".github"
path: public/
remote_path: /home/docs/Websites/trueblocks.io
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.HOST_USER }}
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}
remote_path: /home/${{ secrets.DOCS_USER }}/trueblocks-website
remote_host: ${{ secrets.NEW_SERVER_HOST }}
remote_user: ${{ secrets.DOCS_USER }}
remote_key: ${{ secrets.DOCS_PRIVATE_KEY }}

- name: Install linkinator
run: npm install -g linkinator

- name: check links
run: linkinator -r index.html docs/ papers/ data-model/ api/ --skip localhost:23456 --skip tokenomics.io --skip etherscan.io --skip https://twitter.com/trueblocks --skip intro

- name: Test Failure
uses: rjstone/discord-webhook-notify@v1
if: failure()
with:
severity: error
details: Test Failed!
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

- name: Report job status
run: |
echo "This job's status is ${{ job.status }}"
219 changes: 112 additions & 107 deletions content/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ info:
version: 2.5.8-release
description: >
A REST layer over the TrueBlocks application. With `chifra daemon`, you can
A REST layer over the TrueBlocks chifra command line. With `chifra daemon`, you can
run this on your own machine, and make calls to `localhost`.
## How to use this API effectively
Expand All @@ -19,7 +19,7 @@ info:
CLI application, and the query parameters mirror the commands' options and
flags. If you want details, [the commands have their own documentation page](/chifra/introduction/).
For detailed descriptions of fields, see [the data model reference](/data-model/intro/).
For detailed descriptions of data returned by each command, see [the data model reference](/data-model/intro/).
### Before you begin
Expand Down Expand Up @@ -201,19 +201,20 @@ paths:
- $ref: "#/components/schemas/bounds"
example:
{
"data": [
{
"address": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"blockNumber": 4037786,
"transactionIndex": 47
},
{
"address": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"blockNumber": 4037800,
"transactionIndex": 77
},
{ "...": "..." },
]
"data":
[
{
"address": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"blockNumber": 4037786,
"transactionIndex": 47,
},
{
"address": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"blockNumber": 4037800,
"transactionIndex": 77,
},
{ "...": "..." },
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -533,36 +534,38 @@ paths:
- $ref: "#/components/schemas/parameter"
example:
{
"data": [
{
"hash": "0x78a17b79e638190d72a3030a79645c32cf3420a133ea2835206778e5ab63fdc7",
"blockHash": "0xdf551eb24dd5275c22d497b9076f1111f483b71ca37002bee51d5db55d20d2fa",
"blockNumber": 4037786,
"transactionIndex": 47,
"timestamp": 1500352888,
"from": "0x29205869522cc9d1f84b0ad5279a8e74a7c66c15",
"to": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"value": 84353870000000000,
"gas": 90000,
"gasPrice": 20000000000,
"maxFeePerGas": 0,
"maxPriorityFeePerGas": 0,
"isError": 0,
"hasToken": 0,
"receipt": {
"contractAddress": "0x0",
"data":
[
{
"hash": "0x78a17b79e638190d72a3030a79645c32cf3420a133ea2835206778e5ab63fdc7",
"blockHash": "0xdf551eb24dd5275c22d497b9076f1111f483b71ca37002bee51d5db55d20d2fa",
"blockNumber": 4037786,
"transactionIndex": 47,
"timestamp": 1500352888,
"from": "0x29205869522cc9d1f84b0ad5279a8e74a7c66c15",
"to": "0xff9387a9aae1f5daab1cd8eb0e92113ea9d19ca3",
"value": 84353870000000000,
"gas": 90000,
"gasPrice": 20000000000,
"maxFeePerGas": 0,
"maxPriorityFeePerGas": 0,
"isError": 0,
"hasToken": 0,
"receipt":
{
"contractAddress": "0x0",
"gasUsed": 21000,
"effectiveGasPrice": 20000000000,
"status": null,
},
"compressedTx": "0x()",
"gasCost": 420000000000000,
"gasUsed": 21000,
"effectiveGasPrice": 20000000000,
"status": null
"date": "2017-07-18 04:41:28 UTC",
"ether": 0.08435387,
},
"compressedTx": "0x()",
"gasCost": 420000000000000,
"gasUsed": 21000,
"date": "2017-07-18 04:41:28 UTC",
"ether": 0.08435387
},
{ "...": "..." }
]
{ "...": "..." },
],
}
"400":
description: bad input parameter
Expand Down Expand Up @@ -930,41 +933,43 @@ paths:
- $ref: "#/components/schemas/function"
- $ref: "#/components/schemas/parameter"
example:
{
"data": [
{
"name": "PairCreated",
"type": "event",
"stateMutability": "nonpayable",
"signature": "PairCreated(address,address,address,uint256)",
"encoding": "0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9",
"inputs": [
{
"type": "address",
"name": "token0",
"indexed": true,
"internalType": "address"
},
{
"type": "address",
"name": "token1",
"indexed": true,
"internalType": "address"
},
{
"type": "address",
"name": "pair",
"internalType": "address"
},
{
"type": "uint256",
"name": "val_0",
"internalType": "uint256"
}
]
}
]
}
{
"data":
[
{
"name": "PairCreated",
"type": "event",
"stateMutability": "nonpayable",
"signature": "PairCreated(address,address,address,uint256)",
"encoding": "0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9",
"inputs":
[
{
"type": "address",
"name": "token0",
"indexed": true,
"internalType": "address",
},
{
"type": "address",
"name": "token1",
"indexed": true,
"internalType": "address",
},
{
"type": "address",
"name": "pair",
"internalType": "address",
},
{
"type": "uint256",
"name": "val_0",
"internalType": "uint256",
},
],
},
],
}
"400":
description: bad input parameter
/blocks:
Expand Down Expand Up @@ -1820,20 +1825,21 @@ paths:
items:
$ref: "#/components/schemas/token"
example:
{
"data": [
{
"holder": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2",
"balance": "624980000000000000",
"address": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413",
"name": "The DAO Original",
"decimals": 1,
"isContract": true,
"isErc20": true,
"isErc721": true
}
]
}
{
"data":
[
{
"holder": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2",
"balance": "624980000000000000",
"address": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413",
"name": "The DAO Original",
"decimals": 1,
"isContract": true,
"isErc20": true,
"isErc721": true,
},
],
}
"400":
description: bad input parameter
/config:
Expand Down Expand Up @@ -2203,21 +2209,20 @@ paths:
- $ref: "#/components/schemas/chunkPinReport"
example:
{
"data": [
{
"fileName": "000000000-000000000",
"bloomHash": "QmbCQaYmfTR3sGNAvASoVjPynaY9UD31Hfxv7dGtzsptkb",
"indexHash": "QmPmfSrYT5HDpfjj4uYSycaFECo9EqPSuADQ3YPbVp3yu4"
},
{
"fileName": "000000001-000590501",
"bloomHash": "QmSGuSQHgK4S9yiZQ3dKrykQVpLTmdFettY9sAwa537gPL",
"indexHash": "QmSaoxc3XA9DEaA3inhLW5ZKsk5C5LWvowSXpHwVHsMjQp"
},
{
"...": "..."
}
]
"data":
[
{
"fileName": "000000000-000000000",
"bloomHash": "QmbCQaYmfTR3sGNAvASoVjPynaY9UD31Hfxv7dGtzsptkb",
"indexHash": "QmPmfSrYT5HDpfjj4uYSycaFECo9EqPSuADQ3YPbVp3yu4",
},
{
"fileName": "000000001-000590501",
"bloomHash": "QmSGuSQHgK4S9yiZQ3dKrykQVpLTmdFettY9sAwa537gPL",
"indexHash": "QmSaoxc3XA9DEaA3inhLW5ZKsk5C5LWvowSXpHwVHsMjQp",
},
{ "...": "..." },
],
}
"400":
description: bad input parameter
Expand Down

0 comments on commit f72aa31

Please sign in to comment.