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

Deployment automation pipeline using Github Actions #592

Open
2 tasks
monikkaelyse opened this issue Feb 12, 2025 · 1 comment
Open
2 tasks

Deployment automation pipeline using Github Actions #592

monikkaelyse opened this issue Feb 12, 2025 · 1 comment
Assignees

Comments

@monikkaelyse
Copy link
Collaborator

Description

We would like to set up Github Actions to automatically deploy so that this is no longer a manual step and the site is more up to date.

Expected Behavior

  • When a branch is merged to develop, the staging server is updated
  • When any branch is merged to main (no other branch should be merged to main besides develop, but could be a hotfix..), the prod server is updated

Here are the current deployment steps (please see Updating Techtonica's Website doc for more detail)

  1. SSH into DreamHost server
  2. Navigate to appropriate directory for "server", for example "testing.techtonica.org"
  3. Activate the virtual environment: source bin/activate
  4. Change to the source directory: cd techtonica/
  5. Pull the latest code using git pull
  6. Update the requirements by running pip-sync (or pip install -r requirements.txt)
  7. Stop and start the gunicorn process
  systemctl --user stop gunicorn_testing
  systemctl --user enable gunicorn_testing
  systemctl --user restart gunicorn_testing

Acceptance Criteria

  • When a branch is merged to develop, the staging server is updated
  • When any branch is merged to main, prod server is updated

Additional Context

There may occasionally be environment variables that need updating, those go into .env files stored under each ___.techtonica.org directory
The login credentials for the server should be stored in the github secrets and then referenced in the github actions so they are not exposed
The virtual env activation command will change once the new environments are created for the python upgrade

@monikkaelyse
Copy link
Collaborator Author

monikkaelyse commented Feb 12, 2025

@daaimah123 Please let me know if I missed any steps or details. Should we reserve the testing server for just one off testing? Or should staging be on main branch and testing is for develop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants