Skip to content

Prod #192

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Prod #192

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/deploy-vue-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: deploy vue

on:
push:
branches:
- prod

jobs:
deploy-app:
runs-on: ubuntu-latest
steps:
- name: check out the code to build server
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: build the code
run: |
pnpm install --no-frozen-lockfile
pnpm build

- name: copy file to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER_NAME }}
key: ${{ secrets.SSH_KEY }}
source: "./dist/**"
target: "/var/www/html"
strip_components: 1
39 changes: 39 additions & 0 deletions .github/workflows/deploy-vue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: deploy vue

on:
push:
branches:
- master

jobs:
deploy-app:
runs-on: ubuntu-latest
steps:
- name: check out the code to build server
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: build the code
run: |
pnpm install --no-frozen-lockfile
pnpm build

- name: copy file to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER_NAME }}
key: ${{ secrets.SSH_KEY }}
source: "./dist/**"
target: "/var/www/html"
strip_components: 1
2 changes: 1 addition & 1 deletion cypress/e2e/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('homepage', () => {
cy.visit(ROUTES.HOME)

cy.get('h1.logo-font')
.should('contain.text', 'conduit')
.should('contain.text', 'Chindanai Jaiman')
})

it('should highlight Global Feed when home page loaded', () => {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Conduit</title>
<title>Chindanai Jaiman</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="icon" href="/favicon.ico" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="banner">
<div class="container">
<h1 class="logo-font">
conduit
Chindanai Jaiman
</h1>
<p>A place to share your knowledge.</p>
</div>
Expand Down