feat: setup CI to build mcaptcha.io branch and publish to

`mcaptcha-io-pages` branch
This commit is contained in:
Aravinth Manivannan 2022-11-06 17:25:57 +05:30
parent 2bff56060a
commit fc3b6152da
Signed by untrusted user: realaravinth
GPG key ID: AD9F0F08E855ED88

View file

@ -3,7 +3,7 @@ name: github pages
on: on:
push: push:
branches: branches:
- master # Set a branch to deploy - mcaptcha.io # Set a branch to deploy
jobs: jobs:
build: build:
@ -43,8 +43,9 @@ jobs:
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
publish_branch: "mcaptcha-io-pages"
- name: deploy - name: deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'mCaptcha/website' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'mCaptcha/website' }}
run: >- run: >-
curl --location --request POST "https://deploy.batsense.net/api/v1/update" --header 'Content-Type: application/json' --data-raw "{ \"secret\": \"${{ secrets.DEPLOY_TOKEN }}\", \"branch\": \"gh-pages\" }" curl --location --request POST "https://deploy.batsense.net/api/v1/update" --header 'Content-Type: application/json' --data-raw "{ \"secret\": \"${{ secrets.DEPLOY_TOKEN_MCAPTCHA_IO }}\", \"branch\": \"mcaptcha-io-pages\" }"