[{"data":1,"prerenderedAt":451},["ShallowReactive",2],{"navigation":3,"/docs/deployment/automated-deployments-with-github-actions":285,"/docs/deployment/automated-deployments-with-github-actions-surround":446},[4],{"title":5,"path":6,"stem":7,"children":8},"Introduction","/docs","docs/1.index",[9,10,36,53,70,83,100,121,138,155,176],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13,"children":14,"page":35},"Installation","/docs/installation","docs/1.installation",[15,19,23,27,31],{"title":16,"path":17,"stem":18},"Install to macOS","/docs/installation/install-macos","docs/1.installation/1.install-macos",{"title":20,"path":21,"stem":22},"Install to Windows","/docs/installation/install-windows","docs/1.installation/2.install-windows",{"title":24,"path":25,"stem":26},"Install to Linux","/docs/installation/install-linux","docs/1.installation/3.install-linux",{"title":28,"path":29,"stem":30},"Install via Composer","/docs/installation/install-composer","docs/1.installation/4.install-composer",{"title":32,"path":33,"stem":34},"Install via NPM/Yarn","/docs/installation/install-npm-yarn","docs/1.installation/5.install-npm-yarn",false,{"title":37,"path":38,"stem":39,"children":40,"page":35},"Community","/docs/community","docs/11.community",[41,45,49],{"title":42,"path":43,"stem":44},"Get Help","/docs/community/get-help","docs/11.community/1.get-help",{"title":46,"path":47,"stem":48},"Testing New Releases","/docs/community/testing","docs/11.community/2.testing",{"title":50,"path":51,"stem":52},"Contributing","/docs/community/contributing","docs/11.community/3.contributing",{"title":54,"path":55,"stem":56,"children":57,"page":35},"Getting Started","/docs/getting-started","docs/2.getting-started",[58,62,66],{"title":59,"path":60,"stem":61},"How Spin Works","/docs/getting-started/how-spin-works","docs/2.getting-started/1.how-spin-works",{"title":63,"path":64,"stem":65},"Create a New Project with Spin","/docs/getting-started/create-a-new-project-with-spin","docs/2.getting-started/2.create-a-new-project-with-spin",{"title":67,"path":68,"stem":69},"Add Spin to an Existing Project","/docs/getting-started/add-spin-to-an-existing-project","docs/2.getting-started/3.add-spin-to-an-existing-project",{"title":71,"path":72,"stem":73,"children":74,"page":35},"Development Environment","/docs/development-environment","docs/3.development-environment",[75,79],{"title":76,"path":77,"stem":78},"Starting Up Your Development Environment","/docs/development-environment/starting-up-your-development-environment","docs/3.development-environment/1.starting-up-your-development-environment",{"title":80,"path":81,"stem":82},"Running Commands in Development","/docs/development-environment/running-commands-in-development","docs/3.development-environment/2.running-commands-in-development",{"title":84,"path":85,"stem":86,"children":87,"page":35},"Server Configuration","/docs/server-configuration","docs/4.server-configuration",[88,92,96],{"title":89,"path":90,"stem":91},"Server Requirements","/docs/server-configuration/server-requirements","docs/4.server-configuration/1.server-requirements",{"title":93,"path":94,"stem":95},"Server Configuration Basics","/docs/server-configuration/server-configuration-basics","docs/4.server-configuration/2.server-configuration-basics",{"title":97,"path":98,"stem":99},".spin.yml Usage","/docs/server-configuration/spin-yml-usage","docs/4.server-configuration/3.spin-yml-usage",{"title":101,"path":102,"stem":103,"children":104,"page":35},"Providers","/docs/providers","docs/5.providers",[105,109,113,117],{"title":106,"path":107,"stem":108},"DigitalOcean","/docs/providers/digitalocean","docs/5.providers/0.digitalocean",{"title":110,"path":111,"stem":112},"Hetzner","/docs/providers/hetzner","docs/5.providers/0.hetzner",{"title":114,"path":115,"stem":116},"Vultr","/docs/providers/vultr","docs/5.providers/0.vultr",{"title":118,"path":119,"stem":120},"Use Any Host","/docs/providers/use-any-host","docs/5.providers/99.use-any-host",{"title":122,"path":123,"stem":124,"children":125,"page":35},"Deployment","/docs/deployment","docs/6.deployment",[126,130,134],{"title":127,"path":128,"stem":129},"Choosing a Deployment Strategy","/docs/deployment/choosing-a-deployment-strategy","docs/6.deployment/1.choosing-a-deployment-strategy",{"title":131,"path":132,"stem":133},"Automated Deployments with GitHub Actions","/docs/deployment/automated-deployments-with-github-actions","docs/6.deployment/2.automated-deployments-with-github-actions",{"title":135,"path":136,"stem":137},"Using \"spin deploy\"","/docs/deployment/using-spin-deploy","docs/6.deployment/3.using-spin-deploy",{"title":139,"path":140,"stem":141,"children":142,"page":35},"Server Access","/docs/server-access","docs/7.server-access",[143,147,151],{"title":144,"path":145,"stem":146},"Connecting to Your Server","/docs/server-access/connecting-to-your-server","docs/7.server-access/1.connecting-to-your-server",{"title":148,"path":149,"stem":150},"Troubleshooting Your Application","/docs/server-access/troubleshooting-your-application","docs/7.server-access/2.troubleshooting-your-application",{"title":152,"path":153,"stem":154},"Updating Your Server","/docs/server-access/updating-your-server","docs/7.server-access/3.updating-your-server",{"title":156,"path":157,"stem":158,"children":159,"page":35},"Advanced","/docs/advanced","docs/8.advanced",[160,164,168,172],{"title":161,"path":162,"stem":163},"Generating a Secure SSH Key","/docs/advanced/generating-a-secure-ssh-key","docs/8.advanced/2.generating-a-secure-ssh-key",{"title":165,"path":166,"stem":167},"Adding Other Services","/docs/advanced/adding-other-services","docs/8.advanced/3.adding-other-services",{"title":169,"path":170,"stem":171},"Create your own Spin Template","/docs/advanced/create-your-own-template","docs/8.advanced/99.create-your-own-template",{"title":173,"path":174,"stem":175},"Migrating from Spin v2 to v3","/docs/advanced/migrating-from-spin-v2-to-v3","docs/8.advanced/migrating-from-spin-v2-to-v3",{"title":177,"path":178,"stem":179,"children":180,"page":35},"Command Reference","/docs/command-reference","docs/9.command-reference",[181,185,189,193,197,201,205,209,213,217,221,225,229,233,237,241,245,249,253,257,261,265,269,273,277,281],{"title":182,"path":183,"stem":184},"base64","/docs/command-reference/base64","docs/9.command-reference/base64",{"title":186,"path":187,"stem":188},"build","/docs/command-reference/build","docs/9.command-reference/build",{"title":190,"path":191,"stem":192},"configure","/docs/command-reference/configure","docs/9.command-reference/configure",{"title":194,"path":195,"stem":196},"debug","/docs/command-reference/debug","docs/9.command-reference/debug",{"title":198,"path":199,"stem":200},"deploy","/docs/command-reference/deploy","docs/9.command-reference/deploy",{"title":202,"path":203,"stem":204},"down","/docs/command-reference/down","docs/9.command-reference/down",{"title":206,"path":207,"stem":208},"exec","/docs/command-reference/exec","docs/9.command-reference/exec",{"title":210,"path":211,"stem":212},"gh","/docs/command-reference/gh","docs/9.command-reference/gh",{"title":214,"path":215,"stem":216},"help","/docs/command-reference/help","docs/9.command-reference/help",{"title":218,"path":219,"stem":220},"init","/docs/command-reference/init","docs/9.command-reference/init",{"title":222,"path":223,"stem":224},"kill","/docs/command-reference/kill","docs/9.command-reference/kill",{"title":226,"path":227,"stem":228},"latest","/docs/command-reference/latest","docs/9.command-reference/latest",{"title":230,"path":231,"stem":232},"logs","/docs/command-reference/logs","docs/9.command-reference/logs",{"title":234,"path":235,"stem":236},"maintain","/docs/command-reference/maintain","docs/9.command-reference/maintain",{"title":238,"path":239,"stem":240},"mkpasswd","/docs/command-reference/mkpasswd","docs/9.command-reference/mkpasswd",{"title":242,"path":243,"stem":244},"new","/docs/command-reference/new","docs/9.command-reference/new",{"title":246,"path":247,"stem":248},"provision","/docs/command-reference/provision","docs/9.command-reference/provision",{"title":250,"path":251,"stem":252},"prune","/docs/command-reference/prune","docs/9.command-reference/prune",{"title":254,"path":255,"stem":256},"ps","/docs/command-reference/ps","docs/9.command-reference/ps",{"title":258,"path":259,"stem":260},"pull","/docs/command-reference/pull","docs/9.command-reference/pull",{"title":262,"path":263,"stem":264},"run","/docs/command-reference/run","docs/9.command-reference/run",{"title":266,"path":267,"stem":268},"stop","/docs/command-reference/stop","docs/9.command-reference/stop",{"title":270,"path":271,"stem":272},"up","/docs/command-reference/up","docs/9.command-reference/up",{"title":274,"path":275,"stem":276},"update","/docs/command-reference/update","docs/9.command-reference/update",{"title":278,"path":279,"stem":280},"vault","/docs/command-reference/vault","docs/9.command-reference/vault",{"title":282,"path":283,"stem":284},"version","/docs/command-reference/version","docs/9.command-reference/version",{"id":286,"title":131,"body":287,"canonical":436,"description":437,"extension":438,"layout":439,"meta":440,"navigation":443,"path":132,"seo":444,"stem":133,"__hash__":445},"docs/docs/6.deployment/2.automated-deployments-with-github-actions.md",{"type":288,"value":289,"toc":428},"minimark",[290,297,322,327,333,358,361,368,372,375,393,396,400,403,411,415,422],[291,292,293],"lead-p",{},[294,295,296],"p",{},"Spin is compatible with any CI/CD that can build Docker images and run SSH commands on a remote server. In this guide, we cover the tools available to help make your deployments through GitHub Actions easier.",[298,299,300],"note",{},[294,301,302,306,307,310,312,313,321],{},[303,304,305],"strong",{},"Looking for the easiest way to automated Laravel deployments?"," ",[308,309],"br",{},[308,311],{},"We offer a ",[314,315,320],"a",{"href":316,"rel":317,"target":319},"https://getspin.pro",[318],"nofollow","_blank","Spin Pro template"," that is a \"turn-key\" solution for Laravel deployments. All of this will be automated for you and you won't need to spend any time learning the complexities of GitHub Actions. 😃",[323,324,326],"h2",{"id":325},"important-concepts","Important concepts",[294,328,329,332],{},[303,330,331],{},"Zero-downtime deployments highly depend on your configuration with Docker."," For a zero-downtime deployment to work, there are many things that need to align in order for this to happen:",[334,335,336,340,343,346,349,352,355],"ul",{},[337,338,339],"li",{},"A properly configured reverse proxy (like Traefik) and/or load balancer must be configured",[337,341,342],{},"This reverse proxy or load balancer must be able to access your container via the Docker Swarm Service",[337,344,345],{},"Container health checks must be implemented",[337,347,348],{},"Health checks must have an accurate definition of \"healthy\"",[337,350,351],{},"Services must gracefully shut down",[337,353,354],{},"Container update configurations must be properly set for Docker Swarm",[337,356,357],{},"A CI/CD runner must be configured to build a container, upload it to a registry, and have SSH access to trigger a deployment procedure",[294,359,360],{},"Spin's official templates provide containers that are ready for zero-downtime deployments out of the box.",[294,362,363],{},[364,365],"img",{"alt":366,"src":367},"GitHub Actions: Zero-downtime Deployment","/images/docs/github-actions/zero-downtime-deployment.png",[323,369,371],{"id":370},"open-source-github-actions","Open Source GitHub Actions",[294,373,374],{},"Even if you decide to not use the Spin Pro template, we offer our GitHub Actions as open source tools to help you deploy your application with Spin.",[334,376,377,385],{},[337,378,379,384],{},[314,380,383],{"href":381,"rel":382,"target":319},"https://github.com/marketplace/actions/docker-build-action",[318],"serversideup/docker-build-action"," - A simplified syntax to build and publish your Docker images with GitHub Actions.",[337,386,387,392],{},[314,388,391],{"href":389,"rel":390,"target":319},"https://github.com/marketplace/actions/docker-swarm-deploy-github-action",[318],"serversideup/docker-swarm-deploy-github-action"," - A simplified syntax to deploy to Docker Swarm Mode via GitHub Actions.",[294,394,395],{},"Each GitHub Action has it's own documentation on how you can implement it into your workflow.",[323,397,399],{"id":398},"security-considerations","Security Considerations",[294,401,402],{},"Be aware that you're taking a sensitive deployment key, putting that into GitHub actions, and allowing SSH connections from anywhere to connect to your production server. If you want to further harden your server, you may consider:",[334,404,405,408],{},[337,406,407],{},"Deploying your own Self-hosted GitHub Runner",[337,409,410],{},"Locking down SSH access to your server from specific IP addresses",[323,412,414],{"id":413},"the-easiest-way-to-deploy-your-laravel-application","The easiest way to deploy your Laravel application",[294,416,417,418,421],{},"If you're looking for the easiest way to deploy your Laravelapplication, we highly recommend using the ",[314,419,320],{"href":316,"rel":420,"target":319},[318],". This template includes a \"turn-key\" solution for Laravel deployments that is fully automated and requires minimal knowledge of GitHub Actions or Docker.",[294,423,424],{},[314,425,427],{"href":316,"rel":426,"target":319},[318],"Learn more about Spin Pro →",{"title":429,"searchDepth":430,"depth":430,"links":431},"",2,[432,433,434,435],{"id":325,"depth":430,"text":326},{"id":370,"depth":430,"text":371},{"id":398,"depth":430,"text":399},{"id":413,"depth":430,"text":414},null,"Learn how to automate deployments with GitHub Actions.","md","docs",{"head":441},{"title":442},"Automated Deployments with GitHub Actions - Spin by Server Side Up",true,{"title":131,"description":437},"VJOBSP89U68muTSLRPcRhoRTMl_mjfv5_fCdIFuul40",[447,449],{"title":127,"path":128,"stem":129,"description":448,"children":-1},"Learn how to choose a deployment strategy for your application with Spin.",{"title":135,"path":136,"stem":137,"description":450,"children":-1},"Learn how to use the \"spin deploy\" command to deploy your application from your local machine to your server.",1769465038873]