Build a site, upload it to a Selflify preview server, and optionally write metadata for pull request comments.
- checks out the repository
- installs dependencies
- runs the build command you provide
- uploads the output directory to the preview server
- optionally writes a preview metadata artifact when a PR number is present
- id: deploy_preview
uses: Selflify/deploy-preview-action@v1
with:
node-version: "20"
install-cmd: yarn install --immutable
build-cmd: yarn build
site: marketing
path-name: ${{ needs.prepare.outputs.path_name }}
output: dist
preview-base-domain: ${{ secrets.PREVIEW_BASE_DOMAIN }}
preview-root-dir: /var/www
preview-server-host: ${{ secrets.PREVIEW_SERVER_HOST }}
preview-ssh-private-key: ${{ secrets.PREVIEW_SSH_PRIVATE_KEY }}
pr-number: ${{ needs.prepare.outputs.pr_number }}