|
56 | 56 | repository: ndolestudio/httpmock |
57 | 57 | readme-filepath: ./README.md |
58 | 58 | if: github.event_name != 'pull_request' |
59 | | - |
60 | | - web: |
61 | | - runs-on: ubuntu-latest |
62 | | - defaults: |
63 | | - run: |
64 | | - working-directory: ./web |
65 | | - steps: |
66 | | - - name: Checkout |
67 | | - uses: actions/checkout@master |
68 | | - |
69 | | - - name: Install Node.js |
70 | | - uses: actions/setup-node@v4 |
71 | | - with: |
72 | | - node-version: 20 |
73 | | - |
74 | | - - uses: pnpm/action-setup@v2 |
75 | | - name: Install pnpm |
76 | | - with: |
77 | | - version: 10 |
78 | | - run_install: false |
79 | | - |
80 | | - - name: Get pnpm store directory |
81 | | - shell: bash |
82 | | - run: | |
83 | | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
84 | | -
|
85 | | - - uses: actions/cache@v3 |
86 | | - name: Setup pnpm cache |
87 | | - with: |
88 | | - path: ${{ env.STORE_PATH }} |
89 | | - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
90 | | - restore-keys: | |
91 | | - ${{ runner.os }}-pnpm-store- |
92 | | -
|
93 | | - - name: Install dependencies 📦 |
94 | | - run: pnpm install |
95 | | - |
96 | | - - name: Run linter 👀 |
97 | | - run: pnpm run lint |
98 | | - |
99 | | - - name: Setup .env file |
100 | | - run: mv .env.production .env |
101 | | - |
102 | | - - name: Build 🏗️ |
103 | | - run: pnpm run build |
104 | | - env: |
105 | | - REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} |
106 | | - REACT_APP_ENV: production |
107 | | - REACT_APP_COMMIT_HASH: ${{ github.sha }} |
108 | | - REACT_APP_BACKEND_BASE_URL: https://api.httpmock.dev |
109 | | - |
110 | | - - name: Deploy 🚀 |
111 | | - uses: cloudflare/wrangler-action@v3 |
112 | | - with: |
113 | | - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
114 | | - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
115 | | - gitHubToken: ${{ secrets.GITHUB_TOKEN }} |
116 | | - command: pages deploy web/out --project-name=httpmock-cloud |
117 | | - |
118 | | - - name: Create Sentry Release |
119 | | - uses: getsentry/action-release@v1 |
120 | | - env: |
121 | | - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
122 | | - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} |
123 | | - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} |
124 | | - with: |
125 | | - environment: production |
126 | | - projects: ${{ secrets.SENTRY_PROJECT }} |
127 | | - sourcemaps: web/out |
128 | | - version: ${{ github.sha }} |
0 commit comments