ui.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Deploy to Netlify (ui)
  2. on:
  3. push:
  4. branches: [main]
  5. # run this workflow only if an update is made to the ui package
  6. paths:
  7. - "packages/hoppscotch-ui/**"
  8. workflow_dispatch:
  9. jobs:
  10. deploy:
  11. name: Deploy
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout
  15. uses: actions/checkout@v3
  16. - name: Setup environment
  17. run: mv .env.example .env
  18. - name: Setup pnpm
  19. uses: pnpm/action-setup@v2.2.4
  20. with:
  21. version: 8
  22. run_install: true
  23. - name: Setup node
  24. uses: actions/setup-node@v3
  25. with:
  26. node-version: ${{ matrix.node }}
  27. cache: pnpm
  28. - name: Build site
  29. run: pnpm run generate-ui
  30. # Deploy the ui site with netlify-cli
  31. - name: Deploy to Netlify (ui)
  32. run: npx netlify-cli@15.11.0 deploy --dir=packages/hoppscotch-ui/.histoire/dist --prod
  33. env:
  34. NETLIFY_SITE_ID: ${{ secrets.NETLIFY_UI_SITE_ID }}
  35. NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}