Submit Search
Upload
Auto deploy-by-sakura-rental-server
•
2 likes
•
325 views
M
mamezou
Follow
さくらレンタルサーバーでも自動デプロイがしたい! 2021年6月22日の登壇資料 https://sakura-tokyo.connpass.com/event/213361/
Read less
Read more
Technology
Slideshow view
Report
Share
Slideshow view
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
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boston Institute of Analytics
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
The Digital Insurer
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Principled Technologies
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
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
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Boston Institute of Analytics
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
The Digital Insurer
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Principled Technologies
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
Recently uploaded
(20)
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
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