Deploying from GitHub Actions

This guide explains how to deploy changes to your Clodui website from GitHub Actions. This guide uses Clodui Actions for deploying files.

Steps

  1. Create a website by following the steps explained here

  2. Add a workflow file to your repository by following this official documentation configuring-a-workflow

  3. Now add a new step in your workflow YAML file to deploy changes to Clodui like below

    - name: Deploy to Clodui
      uses: clodui/actions-cli@v2.0
      with:
        username: [Replace this with your Clodui username]
        password: [Replace this with your Clodui password]
        website-id: [Replace this with your Clodui website id]
        source-dir:
          [Relative path from your workspace directory to your website files]
        publish: publish

    For security, better to read Clodui credentials from secrets store under your GitHub repository.

  4. Shown below a sample workflow YAML from a React application. To build the application it runs npm run build command and generated output files are stored under public directory. These files are deployed to Clodui using clodui/actions-cli@v2.0

    name: "Deploy Website"
    on: [push]
    jobs:
    build:
      runs-on: ubuntu-latest
      steps:
        - name: Checkout
          uses: actions/checkout@v2
        - name: Build
          run: npm run build
        - name: Deploy to Clodui
          uses: clodui/actions-cli@v2.0
          with:
            username: ${{ secrets.CLODUI_USERNAME }}
            password: ${{ secrets.CLODUI_PASSWORD }}
            website-id: ${{ secrets.WEBSITE_ID }}
            source-dir: ./public
            publish: publish

We use cookies to offer you a better experience and analyze site traffic. By continuing to use this website, you consent to the use of our cookies.