Skip to content

[pre-commit.ci] pre-commit autoupdate #137

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #137

Workflow file for this run

### WARNING -- this file was generated by mf
### and stolen from https://github.com/patternfly/patternfly/blob/v5/.github/workflows/pr-preview.yml
name: Deploy PR previews
on:
pull_request_target:
workflow_dispatch:
inputs:
pr_id:
description: PR ID to be deployed to the surge.sh
required: true
default: 0
concurrency: preview-${{ github.ref }}
jobs:
deploy-preview:
runs-on: ubuntu-20.04
env:
DOMAIN: packit-dashboard-pr-${{ github.event.inputs.pr_id || github.event.number }}.surge.sh
GH_PR_NUM: ${{ github.event.inputs.pr_id || github.event.number }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
# Yes, we really need to get the PR changes
- name: Get the PR changes
run: git fetch origin pull/$GH_PR_NUM/head:tmp
- name: List the PR changes
run: |
git rev-parse origin/main
git rev-parse HEAD
git rev-parse tmp
git log origin/main..tmp --format="%b"
- name: Merge the changes with the ‹main›
run: git merge --no-edit tmp
- name: Check out the script from the ‹main› branch
run: git checkout origin/main .github/notify.py
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
cache-dependency-path: frontend/yarn.lock
- name: Install and Build
run: |
(cd frontend && yarn install);
make .install-logos
API_URL="https://prod.packit.dev/api" make transpile-prod
- name: Install deploy dependencies
run: yarn global add surge
- name: Deploy the dashboard to surge.sh
run: surge ./frontend/dist $DOMAIN --token ${{ secrets.SURGE_TOKEN }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
- name: Install ‹ogr›, cause why not
run: python3 -m pip install ogr
- name: Notify PR about the deployment
run: python3 .github/notify.py $DOMAIN
env:
GH_PR_TOKEN: ${{ secrets.RELEASEBOT_GITHUB_TOKEN }}