exile.watch docs
  • Introduction
  • The Maven - exile.watch context
  • Projects
    • hideout
    • crucible
      • Contributing
    • writ
      • Contributing
    • splinters
      • Contributing
      • @exile-watch/biome-config
      • @exile-watch/conventional-changelog-config
      • @exile-watch/lefthook-config
      • @exile-watch/rollup-config
      • @exile-watch/typescript-config
      • @exile-watch/unit-testing-config
    • nucleus
      • Contributing (data)
        • Encounter token breakdown
      • Contributing (scripts)
        • Scripts definition
      • @exile-watch/encounter-data
      • @exile-watch/seo
    • malachai
      • Contributing
      • snap gyazo thumbnail
    • doryani
      • Contributing
      • Actions
        • Authenticate to GitHub Package Registry
        • Install npm dependencies
        • Code quality assurance
        • Deploy webapp
        • Publish package
        • Preview publish package
        • Preview deploy webapp
  • voidstone
    • Contributing
  • Development
    • Commit message guidelines
    • Prerequisites
    • Generating GitHub PAT
    • .npmrc file
  • Architecture
    • Dependencies
    • Tech stack
    • Adoption chart
    • GHA workflows web
  • Legal
    • License - FSL, Apache 2.0
    • Non-Affiliation Notice
    • Code of Conduct
    • Privacy Policy
Powered by GitBook
On this page
  • Usage
  • Sub-actions

Was this helpful?

  1. Projects
  2. doryani
  3. Actions

Preview deploy webapp

Action designed to automate the process of building and deploying a preview version of a webapp to Cloudflare Pages, enabling users to test and evaluate changes before the final release

PreviousPreview publish packageNextvoidstone

Last updated 1 year ago

Was this helpful?

This page covers actions

Usage

In .github/workflows/preview-deploy-webapp.yml paste following snippet:

name: "Preview deploy: @exile-watch / doryani"

on:
  pull_request_target:
    types:
      - labeled

jobs:
  preview-deploy-webapp:
    runs-on: ubuntu-latest
    if: contains(github.event.pull_request.labels.*.name, 'preview-deploy')
    steps:
      - name: Preview deploy Crucible to Cloudflare Pages
        uses: exile-watch/doryani/preview-deploy-webapp@main
        with:
          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          PROJECT_NAME: "crucible"
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          GH_ACTOR: ${{ github.actor }}
          prRef: ${{ github.event.pull_request.head.ref }}

Sub-actions

Action code
Name

Create status comment

Creates status comment after preview-deploy label is applied to the branch

Preview deploy

Creates preview deploy at https://{GIT_SHA}.crucible.dev

Update status comment on success

Once the webapp is deployed, this action updates the status comment created in 00

Update status comment on failure

If 00 or 01 action fails, this action updates the status created in 00

Remove preview publish deploy

Removes preview-deploy label from PR once 00 is completed

00
01
02
03
04
preview-deploy-webapp*
exile.watch