-
Notifications
You must be signed in to change notification settings - Fork 25
51 lines (50 loc) · 1.79 KB
/
pullpreview.yml
File metadata and controls
51 lines (50 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: PullPreview
on:
push:
branches:
- dev
pull_request:
types: [labeled, unlabeled, synchronize, closed, reopened]
jobs:
deploy:
if: github.event_name == 'push' || github.event.label.name == 'pullpreview' || contains(github.event.pull_request.labels.*.name, 'pullpreview')
runs-on: ubuntu-latest
timeout-minutes: 30
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
strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- run: npm ci
- run: npm run gen:curated
- run: npm run docs:build
- uses: pullpreview/action@v5
with:
# Those GitHub users will have SSH access to the servers
admins: eschultz
# Use the cidrs option to restrict access to the live environments to specific IP ranges
cidrs: "0.0.0.0/0"
# PullPreview will use these files when running docker-compose up
compose_files: docker-compose.pullpreview.yml
# The preview URL will target this port
default_port: 443
# Use a 512MB RAM instance type instead of the default 2GB
instance_type: nano
# Ports to open on the server
ports: 443
# custom dns
dns: preview.hexos.com
# self-terminate after 10days
ttl: 10d
env:
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
AWS_REGION: "us-west-2"