Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

A template repository for a WordPress site that is developed locally using Visual Studio Code and deployed to Flywheel.

Notifications You must be signed in to change notification settings

jarrodldavis/action-jackson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Action Jackson

A template for developing a WordPress site locally in Visual Studio Code and deploying to Flywheel.

Overview

This template contains the necessary configuration to set up a WordPress site:

  • in development, using local containers with Visual Studio Code and Docker
  • in production, using GitHub Actions to deploy changes to Flywheel

Usage

New Sites

If you're just getting started on a new site, click the "Use this template" button. See these instructions in the GitHub Docs for more information.

Existing Sites

If you already have a repository you'd like to deploy to Flywheel, create a workflow file in your repository and copy the contents of this workflow into it.

Optionally, you can copy the .devcontainer directory into your repository if you want to use the Visual Studio Code Remote Containers extension.

Deployment Configuration

Once you have a repository with the GitHub Actions worfklow, you'll need to configure it with your SFTP details.

This workflow is set up to deploy a wp-content directory to sftp://sftp.flywheelsites.com/[site-owner]/[site-name]/wp-content, where [site-owner] is the Flywheel user or Organization that owns the site, and [site-name] is the name/slug of the site.

The wp-content directory is chosen as the destination of the deployment since Flywheel, as a Managed WordPress host, automatically manages core WordPress files; as such, only the wp-content directory is relevant for deployments.

In the GitHub Actions workflow file, update these env values:

SFTP_SOURCE

This is the folder in your git repository that will be uploaded to your site on Flywheel.

By default, this workflow assumes that the root of the repository is the wp-content directory, with themes and plugins as top-level folders in the repository (as exemplified in this template). If wp-content is in a sub-directory of your repository, be sure to update SFTP_SOURCE to point to it.

Examples

  • SFTP_SOURCE: ./
  • SFTP_SOURCE: ./path/to/wp-content

SFTP_OWNER

This is the Flywheel user or Organization that owns the site. Keep in mind that this may be different from your Flywheel username if the site is part of an Organization or you are a collaborator on the Flywheel site.

Examples

  • SFTP_OWNER: my-username
  • SFTP_OWNER: org-my-organization-name

SFTP_SITE

This is the kebab-cased version of the site name (sometiems called a "slug"), as you would see in your SFTP client. This corresponds to the site name as configured in the Flywheel Dashboard.

Examples

  • SFTP_SITE: my-site-name

SFTP_USER

This is the username you use to log into Flywheel. Keep in mind that this may be different from the site owner if the site is part of an Organization or you are a collaborator on the Flywheel site.

Examples

  • SFTP_USER: my-username

SFTP_PASSWORD

Do not configure your SFTP password in the GitHub Actions workflow file. It is dangerous to put your password in plaintext configuration files, even if your repository is private. Instead, configure a repository secret named SFTP_PASSWORD.