pulumi / actions-pulumify

Pulumify - A GitHub Action to continuously deploy static website previews

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pulumify - Easy Static Website Previews for GitHub 🍹

Pulumify automatically builds and publishes static website previews to AWS S3 in response to GitHub Pull Requests. This lets you rapidly iterate on website changes that are easily reviewable with your team.

Just configure it using the steps below, open a new PR, and voila!

Pulumify In Action!

Pulumify is powered by Pulumi and GitHub Actions. Pulumi supports other clouds and based on interest, we'd be happy to add support for Azure, GCP, etc.

Configuring Pulumify in Your Repo

To enable Pulumify in your repo, do the following:

  1. Enable GitHub Actions in your account.

  2. Configure your GitHub secrets. This must include your PULUMI_ACCESS_TOKEN in addition to your cloud credentials. For example, to deploy to AWS, you'll need AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY values with appropriate IAM permissions to deploy an S3 website to your account.

  3. Commit the following file as .github/workflows/pulumify.yml:

    name: Pulumify
    on: [pull_request, delete]
    jobs:
      updateLivePreview:
        name: Update Live Preview
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v2
        - uses: docker://pulumi/pulumify
          env:
            AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
            AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
            PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
            PULUMIFY_BUILD: make ensure && hugo --buildFuture -e $GITHUB_SHA
            PULUMIFY_ROOT: public
    

    Feel free to customize the PULUMIFY_BUILD or PULUMIFY_ROOT settings as appropriate. This example uses Hugo. It's also possible to deploy to a Pulumi organization using PULUMIFY_ORGANIZATION.

After these three steps, the Pulumify GitHub Action will comment on your PRs automatically with URLs to your websites.

About

Pulumify - A GitHub Action to continuously deploy static website previews


Languages

Language:Python 98.2%Language:CSS 1.0%Language:TypeScript 0.4%Language:JavaScript 0.2%Language:Shell 0.1%Language:TeX 0.0%Language:Dockerfile 0.0%Language:Batchfile 0.0%