Last active
January 25, 2024 08:57
-
-
Save crohr/bbd4ef4f19a4322f075d58131dce7891 to your computer and use it in GitHub Desktop.
Revisions
-
crohr revised this gist
Jul 7, 2023 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,9 @@ on: pull_request: types: [labeled, unlabeled, synchronize, closed, reopened] # make sure only one workflow runs at the same time concurrency: ${{ github.ref }} jobs: deploy: permissions: @@ -36,7 +39,7 @@ jobs: # The preview URL will target this port default_port: 80 # Use a 512MB RAM instance type instead of the default 2GB instance_type: nano # Ports to open on the server ports: 80,5432 env: -
crohr revised this gist
Jun 1, 2023 . No changes.There are no files selected for viewing
-
crohr revised this gist
Jun 1, 2023 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,10 +14,10 @@ on: jobs: deploy: permissions: contents: read # to fetch code (actions/checkout) deployments: write # to delete deployments pull-requests: write # to remove labels statuses: write # to create commit status if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.label.name == 'pullpreview' || contains(github.event.pull_request.labels.*.name, 'pullpreview') runs-on: ubuntu-latest timeout-minutes: 30 -
crohr revised this gist
May 31, 2023 . 1 changed file with 10 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ on: # the schedule is optional, but helps to make sure no dangling resources are left when GitHub Action does not behave properly schedule: - cron: "30 2 * * *" # optional, only use if you want to have an always-on branch push: branches: - main @@ -12,6 +13,11 @@ on: jobs: deploy: permissions: contents: read # to fetch code (actions/checkout) deployments: write # to delete deployments pull-requests: write # to remove labels statuses: write # to create commit status if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.label.name == 'pullpreview' || contains(github.event.pull_request.labels.*.name, 'pullpreview') runs-on: ubuntu-latest timeout-minutes: 30 @@ -20,12 +26,12 @@ jobs: - uses: pullpreview/action@v5 with: # Those GitHub users will have SSH access to the servers admins: your-github-username,other-github-username # Optional: a preview environment will always exist for the main branch always_on: main # Optional: use the cidrs option to restrict access to the live environments to specific IP ranges cidrs: "0.0.0.0/0" # Optional: specify the compose files to use compose_files: docker-compose.yml,docker-compose.pullpreview.yml # The preview URL will target this port default_port: 80 -
crohr created this gist
Mar 10, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ # .github/workflows/pullpreview.yml name: PullPreview on: # the schedule is optional, but helps to make sure no dangling resources are left when GitHub Action does not behave properly schedule: - cron: "30 2 * * *" push: branches: - main pull_request: types: [labeled, unlabeled, synchronize, closed, reopened] jobs: deploy: if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.label.name == 'pullpreview' || contains(github.event.pull_request.labels.*.name, 'pullpreview') runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v2 - uses: pullpreview/action@v5 with: # Those GitHub users will have SSH access to the servers admins: crohr,other-github-user # A staging environment will always exist for the master branch always_on: main # Use the cidrs option to restrict access to the live environments to specific IP ranges cidrs: "0.0.0.0/0" # PullPreview will use those 2 files when running docker-compose up compose_files: docker-compose.yml,docker-compose.pullpreview.yml # The preview URL will target this port default_port: 80 # Use a 512MB RAM instance type instead of the default 2GB instance_type: nano_2_0 # Ports to open on the server ports: 80,5432 env: AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}" AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" AWS_REGION: "us-east-1"