Skip to content

Commit

Permalink
Update deploy_fleek.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jjavieralv authored Jul 16, 2024
1 parent ff0598c commit 38a6c32
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/deploy_fleek.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- "develop"
- "master"
- "testing-deployment"

jobs:
build-deploy-mainnet:
Expand Down Expand Up @@ -113,3 +114,65 @@ jobs:
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \
-F sourcemap=@$f
done
build-deploy-testing-deployment:
runs-on: ubuntu-20.04
container: fleek/create-react-app:node-15
if: github.ref == 'refs/heads/testing-deployment'
strategy:
matrix:
environment: ["RINKEBY", "STAGING"]
include:
- environment: "RINKEBY"
fleekfile: "rinkeby.json"
environment_name: "rinkeby"
subgraph_name: ""
- environment: "STAGING"
fleekfile: "staging.json"
environment_name: "staging"
subgraph_name: "staging"
environment: ${{ matrix.environment }}
steps:
- uses: actions/checkout@v2
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14
- name: install dependencies
run: yarn install
- name: lint
run: yarn lint
- name: build app
env:
REACT_APP_ANALYTICS_KEY: ${{ secrets.REACT_APP_ANALYTICS_KEY }}
REACT_APP_DEPLOY_VERSION: ${{ github.sha }}
REACT_APP_DEPLOY_ENVIRONMENT: ${{ matrix.environment_name }}
REACT_APP_CHAIN_ID: 4
REACT_APP_ETHERSCAN_ENDPOINT: ${{ secrets.REACT_APP_ETHERSCAN_ENDPOINT }}
REACT_APP_SUBGRAPH_NAME: ${{ matrix.subgraph_name }}
run: yarn build
- name: Activate fleek
env:
FLEEK_FILE: ${{ matrix.fleekfile }}
run: mv .github/fleek/$FLEEK_FILE .fleek.json
- name: Deploy fleek
id: deploy
uses: fleekhq/action-deploy@v1
with:
apiKey: ${{ secrets.FLEEK_API_KEY }}
- name: Get the output url
run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}"
- name: upload sourcemap to apm
env:
COMMIT_SHA: ${{ github.sha }}
run: |
for f in $(find ./build/static/ -name *.js.map) ; do
curl -X POST "https://kibana-sourcemaps.aragon.org/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${{ secrets.APM_API_KEY }}' \
-F service_name="court" \
-F service_version="$COMMIT_SHA" \
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \
-F sourcemap=@$f
done

0 comments on commit 38a6c32

Please sign in to comment.