1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-09-14 09:35:04 +00:00

Add branch preview deployment and local testing

- Add preview environment for feature branch testing
- Create local deployment test script
- Enable testing without requiring main branch
- Preview URL: project-branch.gitlab.io
This commit is contained in:
2025-08-21 23:38:58 -06:00
parent 52229040c6
commit 84f4e48386
2 changed files with 72 additions and 0 deletions

View File

@@ -32,6 +32,23 @@ deploy:
paths:
- public
# Branch preview deployment (for testing)
preview:
stage: deploy
script:
- echo "Deploying branch preview..."
- echo "Preview available at: ${CI_ENVIRONMENT_URL}"
needs:
- deploy
artifacts:
paths:
- public
environment:
name: preview/$CI_COMMIT_REF_SLUG
url: https://${CI_PROJECT_PATH_SLUG}-${CI_COMMIT_REF_SLUG}.gitlab.io
rules:
- if: "$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH"
# GitLab Pages deployment (only on main branch)
pages:
stage: deploy