-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 2.69 KB
/
publish-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Publish PR'
on: [pull_request]
jobs:
pr-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install
run: yarn install
- name: Create env file
run: |
echo "VITE_FIX_LANDING_PAGE_URL=${{ vars.FIX_LANDING_PAGE_URL }}" > .env.production
echo "VITE_FIX_DOCS_URL=${{ vars.FIX_DOCS_URL }}" > .env.production
echo "VITE_BOOK_A_CALL_URL=${{ vars.BOOK_A_CALL_URL }}" >> .env.production
echo "VITE_DISCORD_URL=${{ vars.DISCORD_URL }}" >> .env.production
echo "VITE_GITHUB_URL=${{ vars.NGITHUB_URL }}" >> .env.production
echo "VITE_VIDEOS_ASSETS_URL=${{ vars.VIDEOS_ASSETS_URL }}" >> .env.production
echo "VITE_IMAGES_ASSETS_URL=${{ vars.IMAGES_ASSETS_URL }}" >> .env.production
echo "VITE_USE_PROXY=false" >> .env.production
echo "VITE_MIN_ACTIVE_MINUTES=${{ vars.MIN_ACTIVE_MINUTES }}" >> .env.production
echo "VITE_NETWORK_RETRY_COUNT=${{ vars.NETWORK_RETRY_COUNT }}" >> .env.production
echo "VITE_WEBSOCKET_RETRY_TIMEOUT=${{ vars.WEBSOCKET_RETRY_TIMEOUT }}" >> .env.production
echo "VITE_USE_MOCK=false" >> .env.production
echo "VITE_MUI_LICENSE_KEY=${{ secrets.MUI_LICENSE_KEY }}" >> .env.production
echo "VITE_LOAD_PAGE_TIMEOUT=${{ vars.LOAD_PAGE_TIMEOUT }}" >> .env.production
echo "VITE_POSTHOG_DEV_PROJECT_API_KEY=${{ secrets.POSTHOG_DEV_PROJECT_API_KEY }}" >> .env.production
echo "VITE_POSTHOG_API_HOST=${{ vars.POSTHOG_API_HOST }}" >> .env.production
echo "VITE_POSTHOG_UI_HOST=${{ vars.POSTHOG_UI_HOST }}" >> .env.production
- name: Add models
run: |
echo "[]" > mock-apis/data/model.json
echo "{ \"accounts\": [], \"regions\": [], \"kinds\": [], \"severity\": [] }" > mock-apis/data/search-start.json
echo "[]" > mock-apis/data/table.json
echo "[]" > mock-apis/data/tags.json
- name: Update translation
run: yarn i18n:extract
- name: Run Test Build
run: PUBLIC_URL=${{ vars.PUBLIC_TEST_PR_URL }}/${{ github.event.number }}/ yarn build
- name: Publish Test Build
uses: BetaHuhn/do-spaces-action@v2
with:
access_key: ${{ secrets.FIX_UI_DO_SPACES_KEY }}
secret_key: ${{ secrets.FIX_UI_DO_SPACES_SECRET }}
space_name: ${{ secrets.FIX_UI_DO_SPACE_NAME }}
space_region: ${{ secrets.FIX_UI_DO_SPACE_REGION }}
out_dir: fix-test-ui-build/${{github.event.number}}
source: dist