Skip to content

added flowbite and daisyui guide #10

added flowbite and daisyui guide

added flowbite and daisyui guide #10

Workflow file for this run

name: Deploy to GitHub Pages
on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: generate static site
run: pnpm run generate
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
- name: Set branch name
id: cloudflare_branch
run: |
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
echo "CLOUFLARE_BRANCH=main" >> $GITHUB_ENV
elif [ "${{ github.actor }}" = "suabahasa" ]; then
if [[ "${{ github.event.head_commit.message }}" =~ \[build:.*\] ]]; then
echo "CLOUFLARE_BRANCH=${BASH_REMATCH[1]}" >> $GITHUB_ENV
else
echo "CLOUFLARE_BRANCH=${{ github.ref }}" >> $GITHUB_ENV
fi
else
echo "CLOUFLARE_BRANCH=${{ github.ref }}" >> $GITHUB_ENV
fi
- name: Publish to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy .output/public --project-name=windpress --branch=${{ env.CLOUFLARE_BRANCH }}