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:
|
2023-08-12 11:26:42 +03:00
|
|
|
runs-on: ubuntu-22.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
|
2024-10-26 14:14:16 +03:00
|
|
|
uses: actions/checkout@v4
|
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
|
2024-10-26 14:14:16 +03:00
|
|
|
uses: actions/setup-node@v4
|
2021-05-09 14:34:39 +03:00
|
|
|
with:
|
2024-10-26 14:14:16 +03:00
|
|
|
node-version: 22.x
|
2021-05-09 14:34:39 +03:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-08-12 11:26:42 +03:00
|
|
|
npm ci && \
|
2023-12-19 01:12:51 +03:00
|
|
|
node ./scripts/set-homepage.cjs /shlink-web-client/${GITHUB_HEAD_REF#refs/heads/} && \
|
2024-10-26 14:14:16 +03:00
|
|
|
node --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
|