Skip to content

Commit

Permalink
chore: add refactored gh-pages deployments (#1092)
Browse files Browse the repository at this point in the history
* chore: update build and deploy script for testing

* chore: fixes the deployments folder

* fix: fixes the individual branch name path

* chore: restrict dapps to react for faster testing

* fix: fixes test script to deploy dapps

* fix: fixes bugs in the build script

* fix: fixes sdk-copy script

* fix: should fix copy to non existent folder

* fix: fixes workflow and adds fork protection

* fix: fixes workflow and adds trigger method

* fix: fixes workflow and adds trigger method

* chore: removes environment

* chore: allows deploys on top and removes dep installation from the job

* fix: fixes workflow

* fix: minimizing deploy script

* fix: bugfixing

* chore: adds remainder of the exampels and adds the job step to update examples

* chore: adds sdk_copy to with-web3onboard

* chore: adds sdk_copy to pure-js

* chore: fixes sdk_copy scripts

* chore: adapt build script to align with pure-javascript

* chore: update examples to latest

* fix: fixes sdk copy for wagmi-demo

* fix: fixes deploy script for pure-js

* fix: adapt build scripts to the new output dirs

* fix: fix regression

* chore: updates examples and adds more info to build script

* chore: update web3onboard to latest

* fix: fix web3onboard sdk_copy and improve templating

* chore: bump action to latest

* chore: avoid building when build type is prod

* chore: sets the homepage for the react example to gh pages

* chore: reverts action to v3 while v4 isnt approved

* chore: adapt update-examples script to allow bump from CI

* chore: changes homepage to allow dynamic setting

* chore: testing

* chore: revert react-app homepage

* chore: updates react demo with a vite version instead

* chore: removes create-react-app

* fix: fixes vite config

* fix: fixes vite config

* chore: makes the build script aware of existing deploys to then add them to the index.html list

* chore: addresses comments
  • Loading branch information
christopherferreira9 authored Oct 25, 2024
1 parent 8dacf3c commit 9efe8f9
Show file tree
Hide file tree
Showing 71 changed files with 6,005 additions and 17,590 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@ on:
push:
branches: [main]
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
inputs:
IS_RELEASE:
description: 'Is this a release build?'
required: true
type: boolean
default: false
pull_request:
types: [labeled]

jobs:

build-and-deploy:
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.label.name == 'deploy')
runs-on: ubuntu-latest
environment: github-pages

steps:
- name: Checkout Repository
Expand All @@ -25,14 +37,19 @@ jobs:
- name: Install Dependencies
run: yarn --immutable

- name: Update Examples Dapps
if: github.event_name == 'workflow_dispatch' && github.event.inputs.IS_RELEASE == 'true'
run: bash ./scripts/update-examples-dapps.sh

- name: Build All Static Example Projects
env:
IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.IS_RELEASE == 'true' || false }}
run: bash ./scripts/build-static-dapps.sh

- name: Deploy dapps
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
force_orphan: true
# force_orphan: true # removing for now as it is incompatible with keep_files
keep_files: true # Important to keep the rest of the files deployed previously
publish_dir: ./deployments

1 change: 0 additions & 1 deletion packages/examples/create-react-app/.env.sample

This file was deleted.

23 changes: 0 additions & 23 deletions packages/examples/create-react-app/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions packages/examples/create-react-app/README.md

This file was deleted.

50 changes: 0 additions & 50 deletions packages/examples/create-react-app/package.json

This file was deleted.

Binary file not shown.
43 changes: 0 additions & 43 deletions packages/examples/create-react-app/public/index.html

This file was deleted.

Binary file not shown.
Binary file not shown.
25 changes: 0 additions & 25 deletions packages/examples/create-react-app/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/examples/create-react-app/public/robots.txt

This file was deleted.

8 changes: 0 additions & 8 deletions packages/examples/create-react-app/src/App.test.js

This file was deleted.

36 changes: 0 additions & 36 deletions packages/examples/create-react-app/src/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/examples/create-react-app/src/logo.svg

This file was deleted.

13 changes: 0 additions & 13 deletions packages/examples/create-react-app/src/reportWebVitals.js

This file was deleted.

5 changes: 0 additions & 5 deletions packages/examples/create-react-app/src/setupTests.js

This file was deleted.

27 changes: 0 additions & 27 deletions packages/examples/create-react-app/tsconfig.json

This file was deleted.

Loading

0 comments on commit 9efe8f9

Please sign in to comment.