-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00d063f
commit 7b0e826
Showing
41 changed files
with
34,252 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Transfer Build Files | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup SSH | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
known_hosts: ${{ secrets.KNOWN_HOSTS }} | ||
|
||
- name: executing remote ssh commands using passwordss | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.REMOTE_HOST }} | ||
username: ${{ secrets.REMOTE_USERNAME }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
script: | | ||
whoami | ||
# cd /home/ubuntu/devops-class | ||
# git pull origin main | ||
# cd all_in_docker | ||
# sudo docker-compose build | ||
# sudo docker-compose up -d backend | ||
# sudo docker-compose up -d frontend | ||
# - name: Transfer Build Files to Ubuntu Instance | ||
# uses: appleboy/scp-action@master | ||
# with: | ||
# host: ${{ secrets.REMOTE_HOST }} | ||
# username: ${{ secrets.REMOTE_USERNAME }} | ||
# key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# source: "build" | ||
# target: "/tmp" | ||
|
||
# - name: Check ls j | ||
# run: ls | ||
|
||
# - name: Check file existence | ||
# id: check_files | ||
# uses: andstor/file-existence-action@v1 | ||
# with: | ||
# files: "build" | ||
# allow_failure: true | ||
|
||
# - name: Archive Build Files | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: build | ||
# path: ./build | ||
|
||
# transfer-files: | ||
# runs-on: ubuntu-latest | ||
# needs: build | ||
# defaults: | ||
# run: | ||
# working-directory: ./all_in_docker/client | ||
# steps: | ||
# - name: Checkout Repository | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Download Build Files | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: build | ||
# path: ./ | ||
|
||
# - name: Transfer Build Files to Ubuntu Instance | ||
# uses: appleboy/scp-action@master | ||
# with: | ||
# host: ${{ secrets.REMOTE_HOST }} | ||
# username: ${{ secrets.REMOTE_USERNAME }} | ||
# key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
# source: "build/*" | ||
# target: "/path/on/remote/server/" | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
REACT_APP_API_URL = http://35.170.248.42:3001 |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.github/* |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:14-alpine as builder | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install | ||
RUN npm run-script build | ||
|
||
FROM nginx:stable-alpine3.17-slim | ||
COPY --from=builder /app/build /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
Oops, something went wrong.