mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
parent
12f2a5e510
commit
42f367558c
25
.github/workflows/build.yml
vendored
Normal file
25
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Build
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35.4.4
|
||||
|
||||
- name: Check changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
./gradlew clean run --args="verbose singleChainCheck $file"
|
||||
done
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./gradlew run
|
||||
|
57
.github/workflows/build_and_deploy.yml
vendored
57
.github/workflows/build_and_deploy.yml
vendored
|
@ -1,57 +0,0 @@
|
|||
name: Build and Deploy
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35.4.4
|
||||
|
||||
- name: Check changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
./gradlew clean run --args="verbose singleChainCheck $file"
|
||||
done
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./gradlew run
|
||||
|
||||
# deploy to github pages only when on master
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
|
||||
id: extract_branch
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
submodules: recursive
|
||||
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}
|
||||
- name: Run install
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
dir: 'website'
|
||||
cmd: install # will run `yarn install` command
|
||||
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}
|
||||
- name: Test the app
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
dir: 'website'
|
||||
cmd: run build # will run `yarn test` command
|
||||
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: website/public
|
||||
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}
|
34
.github/workflows/deploy.yml
vendored
Normal file
34
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
./gradlew run
|
||||
- name: Run yarn install
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
dir: 'website'
|
||||
cmd: install # will run `yarn install` command
|
||||
- name: Run yarn build
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
dir: 'website'
|
||||
cmd: run build # will run `yarn test` command
|
||||
- name: Merge
|
||||
run: |
|
||||
cp -a output/. website/public/
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: website/public
|
|
@ -103,24 +103,6 @@ private fun createOutputFiles() {
|
|||
File(buildPath, "chain_icons.json").writeText(chainIconJSONArray.toJsonString(prettyPrint = true))
|
||||
|
||||
File(buildPath, "shortNameMapping.json").writeText(shortNameMapping.toJsonString(prettyPrint = true))
|
||||
File(buildPath, "index.html").writeText(
|
||||
"""
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="refresh" content="0; url=https://chainlist.org">
|
||||
<script type="text/javascript">
|
||||
window.location.href = "https://chainlist.org"
|
||||
</script>
|
||||
<title>Page Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
If you are not redirected automatically, follow this <a href='https://chainlist.org'>link to chainlist.org</a>.
|
||||
</body>
|
||||
</html>
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
File(buildPath, ".nojekyll").createNewFile()
|
||||
File(buildPath, "CNAME").writeText("chainid.network")
|
||||
|
|
Loading…
Reference in New Issue
Block a user