From 88cecc41bb285792c59827defad6caff007a754c Mon Sep 17 00:00:00 2001 From: lyonsyonii Date: Thu, 21 Dec 2023 11:38:34 +0100 Subject: [PATCH] FEA: added surge.sh as PR preview builder --- .github/workflows/preview.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/preview.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 0000000..973a11f --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,27 @@ +name: 🔂 Surge PR Preview + +on: + pull_request: + push: + branches: [testing] + +jobs: + preview: + runs-on: ubuntu-latest + permissions: + pull-requests: write # allow surge-preview to create/update PR comments + steps: + - uses: actions/checkout@v2 + - uses: afc163/surge-preview@v1 + id: preview_step + with: + github_token: ${{ github.token }} + surge_token: ${{ secrets.SURGE_TOKEN }} + dist: frontend/dist + teardown: true + failOnError: true + build: | + npm install + npm run build + - name: Get the preview_url + run: echo "url => ${{ steps.preview_step.outputs.preview_url }}" \ No newline at end of file