Skip to content

Merge pull request #213 from ulixee/docs #238

Merge pull request #213 from ulixee/docs

Merge pull request #213 from ulixee/docs #238

Workflow file for this run

name: 'Publish a built Javascript Branch'
on:
push:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Javascript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install pcap
run: sudo apt-get install -y libpcap-dev
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Clone Mainchain
run: git clone -b napi-bindings https://github.com/argonprotocol/mainchain.git
working-directory: ..
- name: Install Mainchain
run: yarn
working-directory: ../mainchain
- name: Install Mainchain client
run: yarn tsc
working-directory: ../mainchain/client/nodejs
- name: Clone Hero
run: |
git clone -n https://github.com/ulixee/hero.git
cd hero
(git fetch --depth 1 origin $GITHUB_REF_NAME && git checkout $GITHUB_REF_NAME) || (git fetch --depth 1 origin main && git checkout main)
working-directory: ..
- name: Install Hero
run: yarn build:simple
working-directory: ../hero
- name: Set timeout
run: yarn config set network-timeout 1000000 -g
- name: Build modules
run: yarn install --frozen-lockfile --ignore-engines && yarn build:dist
- name: Publish branch
run: |
cd build-dist
git config --global user.email "[email protected]"
git config --global user.name "CI"
git init -b main
git add datastore/broker/admin-ui/** -f
git add datastore/docpage/dist/** -f
git add -A
git commit -m 'Auto-build Javascript files'
git push -f https://ulixee:${{ env.GH_TOKEN }}@github.com/ulixee/platform.git main:${{ github.ref_name }}-built-js
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}