2021-05-09 13:34:39 +02:00
|
|
|
name: Deploy preview
|
|
|
|
|
|
|
|
on:
|
2021-05-09 14:39:13 +02:00
|
|
|
pull_request_target: null
|
2021-05-09 13:34:39 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
2023-08-12 10:26:42 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-05-09 13:53:36 +02:00
|
|
|
continue-on-error: true
|
2021-05-09 13:34:39 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-05-27 09:40:10 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-05-09 20:45:22 +02:00
|
|
|
with:
|
2021-05-09 20:58:48 +02:00
|
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
2021-05-09 21:09:24 +02:00
|
|
|
ref: ${{ github.event.pull_request.head.ref }}
|
2021-10-31 00:07:38 +02:00
|
|
|
- name: Use node.js
|
2023-05-27 09:40:10 +02:00
|
|
|
uses: actions/setup-node@v3
|
2021-05-09 13:34:39 +02:00
|
|
|
with:
|
2023-09-23 12:04:58 +02:00
|
|
|
node-version: 20.7
|
2021-05-09 13:34:39 +02:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-08-12 10:26:42 +02:00
|
|
|
npm ci && \
|
2023-12-18 23:12:51 +01:00
|
|
|
node ./scripts/set-homepage.cjs /shlink-web-client/${GITHUB_HEAD_REF#refs/heads/} && \
|
2021-05-09 13:34:39 +02:00
|
|
|
npm run build
|
2021-08-29 10:33:55 +02:00
|
|
|
- name: Deploy preview
|
2021-08-29 11:31:33 +02:00
|
|
|
uses: shlinkio/deploy-preview-action@v1.0.1
|
2021-05-09 13:34:39 +02:00
|
|
|
with:
|
|
|
|
folder: build
|