-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: deploy backend documentation to server
Took 27 minutes
- Loading branch information
Showing
4 changed files
with
70 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,3 +109,57 @@ jobs: | |
screen -S fitplanconnect-backend -X quit | ||
screen -S fitplanconnect-backend -d -m bun run dev | ||
exit | ||
deploy-backend-docs: | ||
name: Deploy Backend Documentation | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Remove old files from server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_SERVER_NAME }} | ||
username: ${{ secrets.SSH_SERVER_USERNAME }} | ||
password: ${{ secrets.SSH_SERVER_PASS }} | ||
port: ${{ secrets.SSH_SERVER_PORT }} | ||
script: | | ||
rm -rf ${{ secrets.SSH_SERVER_BACKEND_DOCS_PATH }}* | ||
- name: Deploy backend docs to server | ||
uses: wlixcc/[email protected] | ||
with: | ||
username: ${{ secrets.SSH_SERVER_USERNAME }} | ||
server: ${{ secrets.SSH_SERVER_NAME }} | ||
port: ${{ secrets.SSH_SERVER_PORT }} | ||
password: ${{ secrets.SSH_SERVER_PASS }} | ||
local_path: "./backend/*" | ||
remote_path: ${{ secrets.SSH_SERVER_BACKEND_DOCS_PATH }} | ||
|
||
- name: Create .env file | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_SERVER_NAME }} | ||
username: ${{ secrets.SSH_SERVER_USERNAME }} | ||
password: ${{ secrets.SSH_SERVER_PASS }} | ||
port: ${{ secrets.SSH_SERVER_PORT }} | ||
script: | | ||
cd ${{ secrets.SSH_SERVER_BACKEND_DOCS_PATH }} | ||
echo -e 'OAUTH_CLIENT_ID="${{ secrets.OAUTH_CLIENT_ID }}"\nOAUTH_CLIENT_SECRET="${{ secrets.OAUTH_CLIENT_SECRET }}"\nOAUTH_REDIRECT_URI="${{ secrets.OAUTH_REDIRECT_URI }}"\nDB_URL="${{ secrets.DB_URL }}"\nSTRIPE_PUBLISHABLE_KEY="${{ secrets.STRIPE_PUBLISHABLE_KEY }}"\nSTRIPE_SECRET_KEY="${{ secrets.STRIPE_SECRET_KEY }}"\nSTRIPE_SUCCESS_KEY="${{ secrets.STRIPE_SUCCESS_KEY }}"' > .env | ||
- name: Run backend documentation | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_SERVER_NAME }} | ||
username: ${{ secrets.SSH_SERVER_USERNAME }} | ||
password: ${{ secrets.SSH_SERVER_PASS }} | ||
port: ${{ secrets.SSH_SERVER_PORT }} | ||
script: | | ||
cd ${{ secrets.SSH_SERVER_BACKEND_PATH }} | ||
bun install | ||
screen -S fitplanconnect-backend-docs -X quit | ||
screen -S fitplanconnect-backend-docs -d -m bun run dev | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters