chore: add metrics to analytics (#1108) #982
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
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 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Fetch all branches | |
run: git fetch --all | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install Yarn 3 | |
run: yarn set version 3.5.1 | |
- 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 # 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 |