diff --git a/.github/workflows/ipfs-deploy.yaml b/.github/workflows/ipfs-deploy.yaml new file mode 100644 index 0000000000..feb252fbe3 --- /dev/null +++ b/.github/workflows/ipfs-deploy.yaml @@ -0,0 +1,33 @@ +on: + push: + branches: + - v2 +name: Deploy to IPFS +jobs: + build-and-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12' + - run: npm install -g yarn + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn + - run: yarn ipfs-build + - name: Upload to IPFS + id: upload + uses: aquiladev/ipfs-action@v1 + with: + path: build/ \ No newline at end of file diff --git a/package.json b/package.json index 5320d90de9..d49902b2e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uniswap", - "description": "Uniswap Protocol", + "description": "Uniswap Interface", "version": "0.1.0", "homepage": "https://uniswap.exchange", "private": true, @@ -83,8 +83,9 @@ "typescript": "^3.8.3" }, "scripts": { - "start": "cross-env REACT_APP_GIT_COMMIT_HASH=$(git show -s --format=%H) react-scripts start", + "start": "react-scripts start", "build": "cross-env REACT_APP_GIT_COMMIT_HASH=$(git show -s --format=%H) react-scripts build", + "ipfs-build": "cross-env PUBLIC_URL=\".\" react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", diff --git a/public/index.html b/public/index.html index 8851fececc..7edc59751e 100644 --- a/public/index.html +++ b/public/index.html @@ -28,7 +28,7 @@ -
+