GitHub Workflow

Description

GitHub is a great resource for keeping a master copy of code projects. With the need for efficient remote-work options for developers, we have started moving towards a GitHub-centered workflow. GitHub will be the center point of web projects that are in development.

Setting Up a Project

  1. When working on the PHOS test server in the office, head over to devboard.test and add a new site. If working on a local server, open your vvv-custom.yml file and add a new site. See more info about local servers here.
  2. Once the site has been added, open up the terminal and cd into the newly created site’s theme folder.
    www\NEWSITE\public_html\wp-content\themes
  3. Run the following command and rename THEMENAME to your new project client/theme name:
    git clone git@github.com:PHOSCreative/PHOS_Framework.git THEMENAME
    – The repo that gets installed should include all the necessary theme files, as well as .babelrc, gulpfile.babel.js, and package.json
  4. Install the necessary base plugins:
    • ACF Pro
    • Better Search and Replace
    • Classic Editor
    • Gravity Forms
    • SendGrid
    • Swift Mailer
    • Velvet Blues Update URLS
    • Yoast
  5. Go to the PHOS GitHub organization and create a new private repo for the project.
  6. Using the terminal, cd into your newly created theme folder and create a new git file by running:
    git init
  7. In your file explorer, navigate to your theme files, open the .git folder and open the config file.
  8. In the /.git/config file, replace the default repo address in terminal command in line 7 (right after “git remote add origin”) with the new git repo address (git@github.com:PHOSCreative/***.git)
  9. In your terminal, within the specific theme folder, run:
    npm run start
MENU