Commit f5640bce authored by Jacob Priddy's avatar Jacob Priddy 👌

add in apidoc generation

parent 91223dd9
Pipeline #13225 passed with stages
in 2 minutes and 4 seconds
......@@ -68,7 +68,14 @@ generate_api_docs:
script:
- cd src/backend
- sed -i 's/\(^APP_ENV=\).*/\1memory/' .env
- "if (php artisan apidoc:generate | grep \"Exception\") then echo \"Failed to generate API docs.\" && false; else true; fi"
- sed -i "s/\(^APP_URL=\).*/\1https:\/\/${DEPLOY_ADDRESS}/" .env
# TEMPORARY UNTIL THIS BRANCH GETS MERGED INTO THE SCRIBE PROJECT
# PHP 8 came out less than a month ago and not everything supports it yet T_T
- cd vendor/knuckleswtf
- rm -rf scribe
- git clone --branch php8 https://github.com/knuckleswtf/scribe.git
- cd ../..
- "if (php artisan scribe:generate | grep \"Exception\") then echo \"Failed to generate API docs.\" && false; else true; fi"
artifacts:
paths:
- src/backend/public/docs
......@@ -129,68 +136,3 @@ stop-prod:
environment:
name: production
action: stop
#deploy_backend_production:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# - SSH_COMMAND_STRING="cd doorcode"
# # get newest changes
# - SSH_COMMAND_STRING+=" && git pull"
# - SSH_COMMAND_STRING+=" && (docker-compose restart || docker-compose up -d)"
# # the -T fixes the input device is not a TTY .. see https://github.com/docker/compose/issues/5696
# - SSH_COMMAND_STRING+=" && docker-compose exec -T api ./update-prod.sh"
# - echo "$SSH_COMMAND_STRING"
# # Execute the deploy
# - ssh $SSH_USER@$SSH_HOST "${SSH_COMMAND_STRING}"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST}/api | grep \"Welcome to the elock API.\""
# environment:
# name: production_api
# url: https://elock.cs.wallawalla.edu/api
# when: manual
# only:
# - master
#
#deploy_api_docs:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# # Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
# - "rsync -a --delete src/backend/public/docs $SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/backend/public/"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST}/api/docs/ | grep \"Welcome to the generated API reference.\""
# environment:
# name: production_api_docs
# url: https://elock.cs.wallawalla.edu/api/docs/
# when: manual
# only:
# - master
#deploy_frontend_production:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# # Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
# - "rsync -a --delete src/frontend/dist $SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/frontend/"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST} | grep \"work properly without JavaScript enabled.\""
# environment:
# name: production_frontend
# url: https://elock.cs.wallawalla.edu
# when: manual
# only:
# - master
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment