Fix for index.html check #42
This file contains 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 characters
name: Trigger CircleCI Build | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
trigger-circleci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Determine environment and branch | |
id: env-branch | |
run: | | |
if [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then | |
echo "::set-output name=environment::development" | |
echo "::set-output name=branch::dev" | |
else | |
echo "::set-output name=environment::production" | |
echo "::set-output name=branch::main" | |
fi | |
- name: Trigger CircleCI Pipeline | |
run: | | |
curl -X POST \ | |
-H "Circle-Token: ${{ secrets.CIRCLECI_API_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"branch": "${{ steps.env-branch.outputs.branch }}", | |
"parameters": { | |
"SOURCE_TYPE": "github", | |
"S3_URL": "", | |
"REPOSITORY": "https://github.com/cheran-senthil/cheran-senthil.github.io", | |
"BUILD_DIR": ".", | |
"PACKAGE_INSTALL_COMMAND": "ls", | |
"BUILD_COMMAND": "ls", | |
"OUTPUT_DIR": ".", | |
"ENVIRONMENT_VARIABLES": "", | |
"ONE_CLICK_SERVER_URL": "https://jorge.ngrok.pro", | |
"ENVIRONMENT": "${{ steps.env-branch.outputs.environment }}" | |
} | |
}' \ | |
https://circleci.com/api/v2/project/gh/earthfast/dashboard-runner/pipeline | |
env: | |
CIRCLECI_API_TOKEN: ${{ secrets.CIRCLECI_API_TOKEN }} |