Svelte Deploy With Github Actions screenshot

Svelte Deploy With Github Actions

Author Avatar Theme by Josecelano
Updated: 10 Sep 2021
18 Stars

This is an example repository about how to automatically deploy Svelte apps to GitHub Pages using GitHub Actions

Overview

This article provides guidance on deploying Svelte applications to GitHub Pages using GitHub Actions. It explains the process of installation and provides instructions on running the app locally. Additionally, it suggests using specific tools and extensions for development.

Features

  • Deployment to GitHub Pages: Learn how to deploy Svelte applications to GitHub Pages.
  • GitHub Actions Integration: Utilize GitHub Actions to automate the deployment process.
  • Live Example: Access a live example of a Svelte app deployed on GitHub Pages.

Installation

To install the Svelte app and start the development server, follow these steps:

  1. Install the project dependencies.
npm install
  1. Start Rollup to bundle the app.
npm run dev
  1. Open your web browser and navigate to localhost:5000 to see the running app.

    • Modify any component file in the src directory, save the changes, and reload the page to see the updates.

    • By default, the server only responds to requests from localhost. To allow connections from other computers, add the --host 0.0.0.0 option to the sirv commands in the package.json file.

  2. For Visual Studio Code users, it is recommended to install the official Svelte extension. For other editors, consider installing a plugin for syntax highlighting and intellisense.

Summary

The article provides a comprehensive guide on deploying Svelte applications to GitHub Pages using GitHub Actions. It covers the installation process and offers tips for local development. By following the steps and suggestions, developers can easily deploy their Svelte apps on GitHub Pages and take advantage of automation provided by GitHub Actions.