Skip to content

Merge pull request #336 from Etherna/fix/EDD-412-loading #256

Merge pull request #336 from Etherna/fix/EDD-412-loading

Merge pull request #336 from Etherna/fix/EDD-412-loading #256

Workflow file for this run

name: Deploy Dapp
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
environment:
name: production
env:
VITE_APP_NAME: "Etherna"
VITE_APP_TAGLINE: "Web3.0 Video Explorer"
VITE_APP_PUBLIC_URL: ${{ secrets.PUBLIC_URL }}
VITE_APP_CMS_URL: ${{ secrets.CMS_URL }}
VITE_APP_VERIFIED_ORIGINS: "etherna.io"
VITE_APP_FEEDBACK_URL: "https://etherna.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-m454we/b/23/a44af77267a987a660377e5c46e0fb64/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=1c189ede"
VITE_APP_INDEX_URL: "https://index.etherna.io"
VITE_APP_GATEWAY_URL: "https://gateway.etherna.io"
VITE_APP_SSO_URL: "https://sso.etherna.io"
VITE_APP_CREDIT_URL: "https://credit.etherna.io"
VITE_APP_MATOMO_URL: "https://analytics.etherna.io"
VITE_APP_API_VERSION: "0.3"
VITE_APP_MATOMO_SITE_ID: "2"
GENERATE_SOURCEMAP: false
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
architecture: "x64"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm install
- name: Build app
run: pnpm build
- name: Cache build artifacts
uses: actions/cache@v3
with:
path: "**/build"
key: build-artifacts-${{ github.sha }}
publish_host:
name: Publish to Host
runs-on: ubuntu-latest
needs: build
environment:
name: production
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Restore build artifacts
uses: actions/cache@v3
with:
path: "**/build"
key: build-artifacts-${{ github.sha }}
- name: Upload to Host
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_HOST }}
user: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
localDir: build
remoteDir: ${{ secrets.FTP_REMOTE_DIR }}
options: "--delete -X cgi-bin/ -X .well-known/"
publish_swarm:
name: Publish on Swarm
runs-on: ubuntu-latest
needs: build
environment:
name: production
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Restore build artifacts
uses: actions/cache@v3
with:
path: "**/build"
key: build-artifacts-${{ github.sha }}
- name: Upload to swarm
uses: Etherna/swarm-upload-action@2.0.0
with:
gateway: https://gateway.etherna.io
localRoot: build
defaultPath: index.html
errorPath: index.html
batchId: ${{ secrets.BATCH_ID }}
ethernaApiKey: ${{ secrets.ETHERNA_API_KEY }}
feedName: EthernaWebApp
feedType: epoch