Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pmndrs/docs workflow #110

Merged
merged 4 commits into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 44 additions & 15 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ on:
- main

jobs:
deploy-static-files:
docs:
uses: pmndrs/docs/.github/workflows/build.yml@app-router
with:
mdx: './docs'
libname: 'uikit'
base_path: '/uikit/docs'
icon: '🎨'

examples:
env:
GOOGLE_FONTS_API_KEY: ${{ secrets.GOOGLE_FONTS_API_KEY }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install Font Forge
run: sudo apt-get install -y fontforge;
Expand Down Expand Up @@ -105,35 +111,58 @@ jobs:
mkdir -p public/examples/lucide
mkdir -p public/examples/market
mkdir -p public/examples/auth
mkdir -p public/apps/html23
cp -r ./examples/apfel/dist/* ./public/examples/apfel
cp -r ./examples/card/dist/* ./public/examples/card
cp -r ./examples/dashboard/dist/* ./public/examples/dashboard
cp -r ./examples/default/dist/* ./public/examples/default
cp -r ./examples/lucide/dist/* ./public/examples/lucide
cp -r ./examples/market/dist/* ./public/examples/market
cp -r ./examples/auth/dist/* ./public/examples/auth
cp -r ./apps/html23/redirect.html ./public/apps/html23/index.html

# Deploy to GH Pages
- name: Add no jekyll
run: touch public/.nojekyll

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
branch: gh-pages
folder: public
name: 'examples'
path: 'public/examples/'

# Deploy Apps to Vercel
- name: Pull Vercel Environment Information
working-directory: ./apps/html23
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
working-directory: ./apps/html23
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
working-directory: ./apps/html23
run: vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

deploy:
runs-on: ubuntu-latest
permissions:
contents: write
needs:
- docs
- examples
steps:
- name: Download Examples Artifiact
uses: actions/download-artifact@v4
with:
name: "examples"
path: "./examples"

- name: Download Docs Artifiact
uses: actions/download-artifact@v4
with:
name: "github-pages"
path: "./docs"

- name: Add no jekyll
run: touch ./.nojekyll

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: .