Submit Search
Upload
Auto deploy-by-sakura-rental-server
•
2 likes
•
324 views
M
mamezou
Follow
さくらレンタルサーバーでも自動デプロイがしたい! 2021年6月22日の登壇資料 https://sakura-tokyo.connpass.com/event/213361/
Read less
Read more
Technology
Report
Share
Report
Share
1 of 33
Download now
Download to read offline
Recommended
Scrabbly GTUG presentation
Scrabbly GTUG presentation
Grant Goodale
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Recommended
Scrabbly GTUG presentation
Scrabbly GTUG presentation
Grant Goodale
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
MounikaPolabathina
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
LoriGlavin3
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
More Related Content
Recently uploaded
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
MounikaPolabathina
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Lars Bell
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
LoriGlavin3
Recently uploaded
(20)
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
Featured
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
Featured
(20)
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Auto deploy-by-sakura-rental-server
1.
さくらレンタルサーバーでも 自動デプロイがしたい! 【GitHubActions】 @mamezou_yuki
2.
ってかお前誰よ data: function() { return
{ profile:[ { name: 'まめぞう', jobDescription: 'フロントエンド多めのエンジニア', job: 'フロントエンド開発, CRM構築, Webマーケティング...etc ', skill: 'Nuxt.js ,React, GAS, Python, Deluge ...etc' , hobby: '将棋, 卓球, 農業', feature:'ヴィーガン11年目', address:’奈良県’,→new! twitter:’@mamezou_yuki’, } ] } },
3.
宣伝)コーヒーもくもく会主催してます 7/4にLT会を開催します。よければご参加ください。
4.
おことわり ・ この内容を参考に実装し、発生した事象全てに対し て、私は一切責任を負いません。予めご了承ください。 ・ この発表内容は個人の見解に基づくものです。
5.
レンタルサーバー、使ってますか?
6.
はじめに 近年はかなりAWS、GCP、Azure、さくらのクラウドな ど、クラウドサーバーを利用するケースが増えてきまし た。
7.
比較してみると… ⃝ 運用コストが安い ⃝ サーバー運用が不要 ✖
柔軟性に欠ける ⃝ 柔軟性に優れる ✖ サーバー管理必要 ✖ コスト高いよ レンタルサーバー クラウドサーバー あまり詳しくないので割愛させてください..
8.
レンサバを使うケースの例 • WordPressのサイト • 企業サイト •
Web制作系 まだまだレンタルサーバーを使うケースも多いはず!
9.
私の場合 • 会社のコーポレートサイト (Vue.js ×
SPAのJamStack) • B to Cサービスサイト (WordPressオリジナルテーマ) • B to C サービスサイト (Django × React ※推奨されてないやつです)
10.
サイト更新のアップロード処理 面倒じゃね?
11.
じゃあ、自動化しちゃおうぜ!
12.
対象者 • サイトの変更をFTPクライアントソフト(FileZillaなど) を利用して毎回更新している人。→私 • レンタルサーバーでSPAサイトを運営している人。→私 •
WordPressのテーマをオリジナルで作成している人。→私 • 自動デプロイをやってみたい人。→私
13.
メリット • 楽ができる。 • 場所に変更がなければ、間違えることがなくなる。 •
社内でドヤ顔ができる。 • Ymlファイルを書けるようになる。 • CD(継続的デプロイ)を構築することができる。
14.
事前準備 • GitHubのアカウントを作成して、リポジトリを作成して おきましょう。 • さくらのレンタルサーバーを契約しましょう。 (必須です。他社は✖) ビジネスプロとスタンダードプランで動作確認していま す。
15.
活用ツール紹介 • GitHubActions • FTP-Deploy-Action
4.0.0 → 当時は2.0.0で利用していましたが、この度バージョン アップしました。
16.
GitHubActionsについて GitHub公式から出ているワークフローの自動化ツールで す。 公式ドキュメント 無料で2000分/月を利用することができます。 1日1回10分くらいなら全然大丈夫です。
17.
FTP-Deploy-Actionについて 素晴らしい自動化ツール。 ソースコード 最新の4系では欲しい機能が っています。(後述)
18.
手順
19.
1. 国外IPアドレスフィルタの設定変更 GitHubActionsからログインできるようにするため。 デフォルトでは有効。無効に変更する。
20.
2. シークレットキーの登録 レンタルサーバーへの接続情報をリポジトリに載せるの は危険なので、GitHubのSecretsキーを利用します。 GitHubのリポジトリを開き、以下手順でキーの作成に移 ります。 Settings ->
Secrets -> New repository secret
21.
2. シークレットキーの登録
22.
3. FTP-Deploy-Actionの確認 FTP-Deploy-Actionのリポジトリ確認。 何はともあれドキュメントを読みましょう。 URL
23.
4. GitHubActionsの設定 Actions ->
set up a work fl ow yourself より、ymlファイ ルを書いていきます。 書き方はドキュメントを参考にしながら書いていきま す。
24.
name: ftp uploa d on : push : branches : -
master jobs : web-deploy : name: 🎉 Deplo y runs-on: ubuntu-lates t steps : - name: 🚚 Get latest cod e uses: actions/checkout@v2.3. 2 - name: 📂 Sync file s uses: SamKirkland/FTP-Deploy-Action@4.0. 0 with : server: ${{ secrets.FTP_SERVER } } username: ${{ secrets.FTP_USERNAME } } password: ${{ secrets.ftp_password } } local-dir: . / server-dir: /www/サービス名/wp-content/themes/テーマ名/ ymlファイル例 (Wordpressテーマ)
25.
name: FTP uploa d on : push : branches : -
maste r jobs : FTP-Deploy-Action : name: FTP-Deploy-Actio n runs-on: ubuntu-lates t steps : - name: 🚚 Get latest cod e uses: actions/checkout@v2.3. 2 - name: Use Node.js 1 2 uses: actions/setup-node@v2-bet a with : node-version: '12 ' - name: Build Projec t run: | npm instal l npm run build --if-presen t - name: 📂 Sync file s uses: SamKirkland/FTP-Deploy-Action@4.0. 0 with : server: ${{ secrets.FTP_SERVER } } username: ${{ secrets.FTP_USERNAME } } password: ${{ secrets.FTP_PASSWORD } } local-dir: ./dist / server-dir: /home/アカウント名/www/該当ディレクトリ/ ymlファイル例 (Vue.js)
26.
※注意点※ プランごとにserver-dirの指定が異なる可能性がありま す。 なので、SSH接続しながら確認していくことをお勧めし ます。 スタンダードプラン: server-dir: /home/アカウント名/www/ディレクトリ/ ビジネスプロプラン: server-dir: /www/ディレクトリ/
27.
いくつかメモ
28.
特定のファイルを除外したい exclude : ‘ファイル名’
29.
テストで回したい テスト時には以下設定することで確認できます。 dry-run : true https://github.com/SamKirkland/FTP-Deploy-Action/ tree/4.0.0
30.
最強の4系 4系は差分のみ反映してくれます。パフォーマンスも改善 し、比較したところ約2倍の速度になりました。 .ftp-deploy-sync-state.json がサーバー側に作成されて、差分検出してくれます。 →無駄な工数がよりなくなりました。
31.
比較してみた なんと4系がおよそ2倍の速度になった!!
32.
あなたもデプロイを自動化して ちょっぴり幸せになりませんか?
33.
ご静聴ありがとうございました。 Zenn記事はこちら
Download now