diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..fa762f7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,43 @@ +--- +name: 'deploy' + +# yamllint disable-line rule:truthy +on: + # onl run this workflow on pull request events + pull_request + +jobs: + review_app: + runs-on: ubuntu-latest + steps: + - name: Cloning repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Push to dokku + uses: dokku/github-action@master + with: + # create a review app + command: review-apps:create + git_remote_url: 'ssh://dokku@dokku.com/nginx-buildpack' + # specify `--force` as a flag for git pushes + git_push_flags: '--force' + # specify a name for the review app + review_app_name: nginx-buildpack-${{ github.event.pull_request.number }} + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} + + destroy_review_app: + runs-on: ubuntu-latest + # only run when a pull request is closed + if: github.event_name == 'pull_request' && github.event.action == 'closed' + steps: + - name: Destroy the review app + uses: dokku/github-action@master + with: + # destroy a review app + command: review-apps:destroy + git_remote_url: 'ssh://dokku@dokku.me:22/nginx-buildpack' + # specify a name for the review app + review_app_name: nginx-buildpack-${{ github.event.pull_request.number }} + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.static b/.static new file mode 100644 index 0000000..df0d2bf --- /dev/null +++ b/.static @@ -0,0 +1 @@ +.static \ No newline at end of file diff --git a/bin/ci-pre-deploy b/bin/ci-pre-deploy new file mode 100644 index 0000000..08b7600 --- /dev/null +++ b/bin/ci-pre-deploy @@ -0,0 +1,15 @@ +#!/bin/sh -l +if [ "$IS_REVIEW_APP" = "true" ]; then + echo "-----> Purging repo cache" + ssh "$SSH_REMOTE" -- repo:purge-cache "$APP_NAME" + + echo "-----> Setting the test domain name" + ssh "$SSH_REMOTE" -- domains:set "$APP_NAME" "$APP_NAME.dokku.net" + + echo "-----> Setting the buildpack to the current commit" + echo "https://github.com/${GITHUB_REPOSITORY}.git#$GITHUB_SHA" > .buildpacks + git add .buildpacks + git config --global user.name 'Dokku Bot' + git config --global user.email no-reply@dokku.com + git commit -qm "feat: specify $GITHUB_SHA as buildpack" +fi \ No newline at end of file diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..ecce221 --- /dev/null +++ b/site/index.html @@ -0,0 +1,45 @@ + + + + Example Domain + + + + + + + + +
+

Example Domain

+

This domain is for use in illustrative examples in documents. You may use this + domain in literature without prior coordination or asking for permission.

+

More information...

+
+ + diff --git a/site/robots.txt b/site/robots.txt new file mode 100644 index 0000000..77470cb --- /dev/null +++ b/site/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file