Skip to content

Instantly share code, notes, and snippets.

@oiehot
Last active May 6, 2017 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oiehot/aaa5f10713f4c31d21f5424a08899e1a to your computer and use it in GitHub Desktop.
Save oiehot/aaa5f10713f4c31d21f5424a08899e1a to your computer and use it in GitHub Desktop.
사이트 프로세스

사이트 프로세스

사전에 나스에서 데스크탑으로 SVN 체크아웃을 한다. 예) svn://nas/oiehot.com/2017

다운로드 받은 파일들은 Hugo와 Stylus로 구성된 정적 사이트 컨텐츠다.

  1. 데스크탑에서 글을 쓴다.

  2. 데스크탑에서 나스SVN으로 커밋한다.

  3. 커밋이 완료되면 NAS에서 특정 스크립트가 실행되어 웹 블로그를 업데이트 한다. 스크립트는 3단계(업데이트, 빌드, 업로드)로 진행된다.

    1. NAS 로컬에 있는 블로그 소스를 업데이트 한다. 데스크탑에서 작성한 내용이 반영된다.
$ svn update /db/oiehot/oiehot.com/2017
    1. 소스를 빌드해서 HTML,CSS,JS로 구성된 사이트를 만든다.
$ cd /db/oiehot/oiehot.com/2017 && ./build
    1. 빌드된 파일들을 클라우드로 올린다.
$ rsync -avz --delete -e ssh /db/oiehot/oiehot.com/2017/public webmaster@oiehot.com:/var/www

※ rsync시 암호를 입력하지 않기 위해서 NAS에서 키를 만들고 클라우드에 미리 저장해둔다.

참고: https://www.lesstif.com/pages/viewpage.action?pageId=12943452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment