2021-05-09 14:34:39 +03:00
|
|
|
name: Deploy preview
|
|
|
|
|
|
|
|
on:
|
2021-05-09 15:39:13 +03:00
|
|
|
pull_request_target: null
|
2021-05-09 14:34:39 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-20.04
|
2021-05-09 14:53:36 +03:00
|
|
|
continue-on-error: true
|
2021-05-09 14:34:39 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2021-05-09 21:45:22 +03:00
|
|
|
with:
|
2021-05-09 21:58:48 +03:00
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
2021-05-09 22:09:24 +03:00
|
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
2021-10-31 01:07:38 +03:00
|
|
|
- name: Use node.js
|
2021-05-09 14:34:39 +03:00
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2022-05-25 19:13:32 +03:00
|
|
|
node-version: 16.15
|
2021-05-09 14:34:39 +03:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-07-17 12:50:26 +03:00
|
|
|
npm ci && \
|
2021-08-29 12:31:33 +03:00
|
|
|
node ./scripts/set-homepage.js /shlink-web-client/${GITHUB_HEAD_REF#refs/heads/} && \
|
2021-06-06 20:06:24 +03:00
|
|
|
rm src/service-worker.ts && \
|
2021-05-09 14:34:39 +03:00
|
|
|
npm run build
|
2021-08-29 11:33:55 +03:00
|
|
|
- name: Deploy preview
|
2021-08-29 12:31:33 +03:00
|
|
|
uses: shlinkio/deploy-preview-action@v1.0.1
|
2021-05-09 14:34:39 +03:00
|
|
|
with:
|
|
|
|
folder: build
|