Gitea Actions

Description

Gitea is a free and open source git repository service that you can self-host (similar to GitLab but less moving parts). It does not offer a static website hosting solution out of the box, but you could always implement your own using something like pages-server. Gitea also offers a built-in CI solution that is compatible with GitHub Actions.

You can have your Plenti websites automatically build and deploy to a specific branch in your repo by adding a .gitea/workflows/build.yml file to your project that will run automatically every time you push to your main branch on GitHub.

name: Plenti Build
run-name: ${{ github.actor }} deployed to build branch
on:
  push:
    branches:
      - main

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

      - name: Build
        uses: docker://plentico/plenti:latest
        with:
          entrypoint: /plenti
          args: build --output="temp"

      - name: Deploy
        run: |
          /usr/bin/git config user.name ${{ github.actor }}
          /usr/bin/git config user.email ci@plenti.co
          /usr/bin/git remote rm origin
          /usr/bin/git remote add origin https://x-access-token:${{ secrets.GITEA_TOKEN }}@your-gitea-instance.com/${{ github.repository }}
          /usr/bin/git add -A
          /usr/bin/git commit -m "Commit temp folder."
          /usr/bin/git push origin `git subtree split --prefix temp master`:prod --no-verify --force