Skip to content

Commit

Permalink
Merge pull request #110 from abernier/docs
Browse files Browse the repository at this point in the history
`pmndrs/docs` workflow
  • Loading branch information
bbohlender authored Aug 15, 2024
2 parents 74e42d0 + 8c5c99e commit 092e91a
Showing 1 changed file with 44 additions and 15 deletions.
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: .

0 comments on commit 092e91a

Please sign in to comment.