Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: auto deploy on push issue #917

Draft
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

Bilelkihal
Copy link
Collaborator

Context

While reviewing the deployment workflow, I noticed that deployment on push is enabled, but it is currently not working. After checking the logs, I found the following error preventing the deployment:
image

Changes

  • Disabled the automatic deployment on push, and kept the manual deployment option via the "Actions" tab on GitHub which is our desired behavior.
  • Clean code.

@Bilelkihal Bilelkihal added the bug Something isn't working label Jan 15, 2025
@Bilelkihal Bilelkihal self-assigned this Jan 15, 2025
Copy link
Collaborator

@syphax-bouazzouni syphax-bouazzouni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the auto deploy should work for stage and test, it need to be fixed not removed .

Copy link
Member

@imadbourouche imadbourouche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error i think is in this step called: copy-deployment-config

image

the deploy.yml file does not copy the configs from the good environment and this is because of the line, because inputs.environment is not set in the push

run: cp -r deploy_config/ontoportal_web_ui/${{ inputs.environment }}/* .

@Bilelkihal Bilelkihal changed the title Fix: Remove auto deploy on push issue Fix: Fix auto deploy on push issue Jan 17, 2025
@Bilelkihal Bilelkihal marked this pull request as draft January 17, 2025 14:24
@syphax-bouazzouni syphax-bouazzouni changed the title Fix: Fix auto deploy on push issue Fix: auto deploy on push issue Jan 30, 2025
echo "TARGET=${USER_INPUT_ENVIRONMENT:-staging}" >> $GITHUB_ENV
# Set default environment for push events
if [ "${{ github.event_name }}" = "push" ]; then
TARGET="staging" # Default to staging for push
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't default push into stage, it need to check the current pushed branch and depending on it decide where to push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants