diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 000000000..b00a4c6eb --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,35 @@ +name: GitHub Actions Vercel Preview Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + Deploy-Preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Ensure pnpm store directory exists + run: mkdir -p ~/.pnpm-store + - name: Cache Node Modules and pnpm Store + uses: actions/cache@v3 + with: + path: | + ~/.pnpm-store + node_modules + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm- + - name: Install pnpm and Vercel CLI + run: | + npm install -g pnpm vercel@canary + - name: Pull Vercel Environment Information + run: vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/production.yaml similarity index 73% rename from .github/workflows/main.yml rename to .github/workflows/production.yaml index bef426427..6802121b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/production.yaml @@ -1,12 +1,12 @@ # This workflow runs the CI command defined in package.json name: CI - +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] push: - branches: [main] - + branches: + - main jobs: ci: name: CI @@ -79,3 +79,15 @@ jobs: # Need to shutdown Anvil so cache gets created - name: 💤 Shutdown Anvil run: pkill -2 anvil + +# TODO @0xMillz for production: (https://vercel.com/guides/how-can-i-use-github-actions-with-vercel) + +# - uses: actions/checkout@v2 +# - name: Install Vercel CLI +# run: npm install --global vercel@latest +# - name: Pull Vercel Environment Information +# run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} +# - name: Build Project Artifacts +# run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} +# - name: Deploy Project Artifacts to Vercel +# run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/apps/web/src/modules/dashboard/DaoProposals.tsx b/apps/web/src/modules/dashboard/DaoProposals.tsx index 77da70a3f..114952391 100644 --- a/apps/web/src/modules/dashboard/DaoProposals.tsx +++ b/apps/web/src/modules/dashboard/DaoProposals.tsx @@ -74,7 +74,7 @@ export const DaoProposals = ({ router.push(`/dao/${currentChainSlug}/${tokenAddress}/proposal/create`) } > - Submit Proposal + Create Proposal