Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d3cf300

Browse files
Revert "Revert "using github workflows""
This reverts commit ca038cd.
1 parent ca038cd commit d3cf300

File tree

2 files changed

+57
-33
lines changed

2 files changed

+57
-33
lines changed

‎.github/workflows/production-ci.yml‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Get yarn cache directory path
14+
id: yarn-cache-dir-path
15+
run: echo "::set-output name=dir::$(yarn cache dir)"
16+
17+
- uses: actions/cache@v1
18+
id: yarn-cache
19+
with:
20+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
25+
- name: Read .nvmrc
26+
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
27+
id: nvm
28+
- name: Use Node.js (.nvmrc)
29+
uses: actions/setup-node@v1
30+
with:
31+
node-version: "${{ steps.nvm.outputs.NVMRC }}"
32+
- name: Installing Dependencies
33+
run: yarn install
34+
- name: Build
35+
run: yarn build --env production
36+
- name: Create temp Directory
37+
uses: appleboy/ssh-action@master
38+
with:
39+
host: ${{ secrets.HOST_PRODUCTION }}
40+
username: ${{ secrets.USERNAME }}
41+
key: ${{ secrets.PRIVATE_KEY }}
42+
script: mkdir -p ~/temp && rm -rf ~/temp/*
43+
- name: Upload Build
44+
uses: appleboy/scp-action@master
45+
with:
46+
host: ${{ secrets.HOST_PRODUCTION }}
47+
username: ${{ secrets.USERNAME }}
48+
key: ${{ secrets.PRIVATE_KEY }}
49+
source: "dist"
50+
target: "temp"
51+
- name: Replace New Build
52+
uses: appleboy/ssh-action@master
53+
with:
54+
host: ${{ secrets.HOST_PRODUCTION }}
55+
username: ${{ secrets.USERNAME }}
56+
key: ${{ secrets.PRIVATE_KEY }}
57+
script: rm -rf ~/frontends/codingblocks.online.projectx/* && cp -rf ~/temp/dist/* ~/frontends/codingblocks.online.projectx && rm -rf ~/temp

‎.travis.yml‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /