GitHub Actions

Description

GitHub Pages is a free hosting service integrated directly with GitHub. You can have your Plenti websites automatically deploy to GitHub Pages by adding a .github/workflows/gh-pages.yml file to your project to automatically build and deploy your website every time you push to your master branch on GitHub.

name: github pages

on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2

      - name: Build
        uses: docker://plentico/plenti:latest
        with:
          entrypoint: /plenti
          args: build

      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages
          FOLDER: public

Or if your project requires additional NPM packages, you can use the NodeJS required build instead:

name: github pages

on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v2-beta
        with:
          node-version: '13'

      - name: Download Plenti
        run: wget -c $(curl -s https://api.github.com/repos/plentico/plenti/releases/latest | grep -o 'http.*linux_64-bit.tar.gz')

      - name: Unpack Plenti
        run: tar -zxvf *_linux_64-bit.tar.gz

      - name: Install node packages
        run: npm install

      - name: Build
        run: ./plenti build

      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages
          FOLDER: public