diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index c946ff8..364657c 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -7,7 +7,7 @@ on: env: DEEPSET_CLOUD_API_KEY: ${{ secrets.DEEPSET_CLOUD_API_KEY }} - DEEPSET_CLOUD_WORKSPACE_NAME: "your-dev-workspace-name" + DEEPSET_CLOUD_WORKSPACE_NAME: "YOUR_DEV_WORKSPACE_NAME" jobs: deploy: @@ -71,54 +71,48 @@ jobs: echo "Pipeline existence check status code: $pipeline_exists" + indexing_content=$(cat "$indexing_yaml") + query_content=$(cat "$query_yaml") + if [[ $pipeline_exists == "404" ]]; then echo "Pipeline $pipeline_name doesn't exist. Creating new pipeline..." - indexing_content=$(cat "$indexing_yaml") - query_content=$(cat "$query_yaml") - - combined_yaml=$(cat < git push origin dev # or main, depending on the branch ``` -2. **Deployment**: - - - The GitHub Actions workflow will redeploy the pipelines based on the reverted code. - -## Security Considerations - -- **API Keys**: - - - Store sensitive information like API keys in **GitHub Secrets**. - - **Do not** commit sensitive data to the repository. +2. The GitHub Actions workflow will automatically redeploy the pipelines based on the reverted code. -- **Workspace Names**: - - - Workspace names are specified in the workflow files. Ensure they are correct to avoid deploying to unintended workspaces. - -- **Secret Rotation**: - - - Regularly rotate your API keys and update the GitHub Secrets accordingly. ## Extending the Template -- **Add More Environments**: - - - To add environments like staging, copy one of the existing workflows and modify the workspace name and trigger conditions. +- **Add More Environments**: Copy and modify existing workflows for additional environments like staging. +- **Notifications**: Add steps to send deployment notifications via email, Slack, etc. -- **Validation and Testing**: - - - Incorporate pipeline validation steps before deployment. - - ```yaml - - name: Validate Pipelines - run: | - for pipeline in pipelines/*.yaml; do - deepset-cloud pipelines validate --file "$pipeline" - done - ``` - -- **Notifications**: - - - Add steps to send deployment notifications via email, Slack, etc. - -## Support and Contributions - -- **Issues**: If you encounter problems, please open an issue. -- **Contributions**: Contributions are welcome! Feel free to fork the repository and submit a pull request. - ----