shlink-web-client/.github/workflows/deploy-preview.yml

30 lines
786 B
YAML
Raw Normal View History

name: Deploy preview
on:
pull_request_target: null
jobs:
deploy:
runs-on: ubuntu-20.04
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
2021-05-09 21:58:48 +03:00
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Use node.js
uses: actions/setup-node@v1
with:
node-version: 16.13
- name: Build
run: |
npm ci && \
2021-08-29 12:31:33 +03:00
node ./scripts/set-homepage.js /shlink-web-client/${GITHUB_HEAD_REF#refs/heads/} && \
rm src/service-worker.ts && \
npm run build
- name: Deploy preview
2021-08-29 12:31:33 +03:00
uses: shlinkio/deploy-preview-action@v1.0.1
with:
folder: build