-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.07 KB
/
preview.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
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Label the PR
uses: actions/labeler@v4
- name: Build with Docker
run: >
docker build
--build-arg="NUXT_APP_BASE_URL=/app-ui/pr-preview/pr-${{ github.event.number }}/"
-t tmp .
- name: Extract static files
run: >
docker run --rm --entrypoint /bin/sh -v $(pwd):/mnt
tmp -c "cp -r /app/client/ /mnt/client/ && chmod -R 777 /mnt/client/"
- name: Updating config.json for not-th.re public
run: >
echo "{\"baseURL\": \"https://api.not-th.re/\", \"terms\":
\"https://scolasti.co/go/privacy\"}" > client/config.json
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
preview-branch: gh-pages
source-dir: ./client