From f112c46bb48705422ad29082f97ea2dfe54720a1 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 19 Jun 2023 11:51:14 +0530 Subject: [PATCH] chore(ci): re-introduce hoppscotch-ui deploy script --- .github/workflows/ui.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ui.yml diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml new file mode 100644 index 000000000..b63aa7ad5 --- /dev/null +++ b/.github/workflows/ui.yml @@ -0,0 +1,41 @@ +name: Deploy to Netlify (ui) + +on: + push: + branches: [main] + # run this workflow only if an update is made to the ui package + paths: + - "packages/hoppscotch-ui/**" + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup environment + run: mv .env.example .env + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.4 + with: + version: 8 + run_install: true + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Build site + run: pnpm run generate-ui + + # Deploy the ui site with netlify-cli + - name: Deploy to Netlify (ui) + run: npx netlify-cli deploy --dir=packages/hoppscotch-ui/.histoire/dist --prod + env: + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }} + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}