From 892727144ba8c2e8fd26c4d9b215b5de69b39c79 Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 18 Apr 2023 13:01:11 +0700 Subject: [PATCH 1/5] ci: add build tests --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4dad87c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Run build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + + - name: Check lint + run: npm run lint + + - name: Build + run: npm run build \ No newline at end of file From dbc236781bac18b9b34ff73f0357c54ace1b1e8d Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 18 Apr 2023 13:01:35 +0700 Subject: [PATCH 2/5] ci: add docker build and push --- .github/workflows/docker.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..fb974e9 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,27 @@ +name: Docker + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Log into GitHub Container Registry + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin + + - name: Get the package.json version + id: package-version + run: echo ::set-output name=version::$(jq -r .version package.json) + - name: Build the Docker image + run: docker build . --file Dockerfile --tag ghcr.io/${{ github.repository }}:${{ steps.package-version.outputs.version }} + - name: Tag the Docker image + run: docker tag ghcr.io/${{ github.repository }}:${{ steps.package-version.outputs.version }} ghcr.io/${{ github.repository }}:latest + - name: Push the Docker image + run: docker push ghcr.io/${{ github.repository }} --all-tags + + From 17114928e3fffbbe0eb1db19fe49830f450cc7ba Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 18 Apr 2023 13:03:01 +0700 Subject: [PATCH 3/5] ci: add separate testing cases for each site --- .github/workflows/redtube.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/xhamster.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/xnxx.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/xvideos.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/youporn.yml | 30 ++++++++++++++++++++++++++++++ 5 files changed, 150 insertions(+) create mode 100644 .github/workflows/redtube.yml create mode 100644 .github/workflows/xhamster.yml create mode 100644 .github/workflows/xnxx.yml create mode 100644 .github/workflows/xvideos.yml create mode 100644 .github/workflows/youporn.yml diff --git a/.github/workflows/redtube.yml b/.github/workflows/redtube.yml new file mode 100644 index 0000000..6a8fc1f --- /dev/null +++ b/.github/workflows/redtube.yml @@ -0,0 +1,30 @@ +name: Redtube test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + + - name: Redtube test + run: npm run test:redtube \ No newline at end of file diff --git a/.github/workflows/xhamster.yml b/.github/workflows/xhamster.yml new file mode 100644 index 0000000..ee060a4 --- /dev/null +++ b/.github/workflows/xhamster.yml @@ -0,0 +1,30 @@ +name: Xhamster test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + + - name: Xhamster test + run: npm run test:xhamster \ No newline at end of file diff --git a/.github/workflows/xnxx.yml b/.github/workflows/xnxx.yml new file mode 100644 index 0000000..cd94b5c --- /dev/null +++ b/.github/workflows/xnxx.yml @@ -0,0 +1,30 @@ +name: Xnxx test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + + - name: Xnxx test + run: npm run test:xnxx \ No newline at end of file diff --git a/.github/workflows/xvideos.yml b/.github/workflows/xvideos.yml new file mode 100644 index 0000000..ab04c80 --- /dev/null +++ b/.github/workflows/xvideos.yml @@ -0,0 +1,30 @@ +name: Xvideos test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + + - name: Xvideos test + run: npm run test:xvideos \ No newline at end of file diff --git a/.github/workflows/youporn.yml b/.github/workflows/youporn.yml new file mode 100644 index 0000000..ed6708d --- /dev/null +++ b/.github/workflows/youporn.yml @@ -0,0 +1,30 @@ +name: Youporn test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + + - name: Youporn test + run: npm run test:youporn \ No newline at end of file From 9c1a4b421ebbdb5ae2df00fcf6ef899703a71b44 Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 18 Apr 2023 13:03:16 +0700 Subject: [PATCH 4/5] ci: generate playground from apidoc definitions --- .github/workflows/playground.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/playground.yml diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml new file mode 100644 index 0000000..2892a4e --- /dev/null +++ b/.github/workflows/playground.yml @@ -0,0 +1,26 @@ +name: Playground + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-and-deploy: + concurrency: ci-${{ github.ref }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Installing dependencies + run: npm install + - name: Generating docs + run: npm run build:apidoc + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + branch: gh-pages + folder: docs \ No newline at end of file From ce7c4020c54038ac17187fcfabc180758a1886e7 Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 18 Apr 2023 13:10:48 +0700 Subject: [PATCH 5/5] build: add flyctl docker deploy config --- fly.toml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 fly.toml diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..db24634 --- /dev/null +++ b/fly.toml @@ -0,0 +1,39 @@ +# fly.toml file generated for lust on 2023-04-18T12:01:37+07:00 + +app = "lust" +kill_signal = "SIGINT" +kill_timeout = 5 +processes = [] + +[env] + +[experimental] + auto_rollback = true + +[[services]] + autostart = true + autostop = false + http_checks = [] + internal_port = 3000 + processes = ["app"] + protocol = "tcp" + script_checks = [] + [services.concurrency] + hard_limit = 25 + soft_limit = 20 + type = "connections" + + [[services.ports]] + force_https = true + handlers = ["http"] + port = 80 + + [[services.ports]] + handlers = ["tls", "http"] + port = 443 + + [[services.tcp_checks]] + grace_period = "1s" + interval = "15s" + restart_limit = 0 + timeout = "2s"