Skip to content

Commit

Permalink
chore:test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gongqiang committed Sep 6, 2024
1 parent edd1338 commit e8d7c4c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
61 changes: 61 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy Docs

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CI: false

jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: 'read'
id-token: 'write'
pages: 'write'
actions: 'write'
checks: 'write'
deployments: 'write'
strategy:
matrix:
node-version: [21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
# Using npm ci is generally faster than running npm i because it caches dependencies
run: |
npm ci
- name: Build the app
run: |
npm run build:docs
- name: Run component tests
run: |
npm run test
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload build directory content
path: 'build/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
env:
GITHUB_TOKEN: ${{ secrets.GUJIAM_PAGES }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"dev": "pnpm --filter @gujiam-element/playground run dev",
"dev:docs": "pnpm --filter @gujiam-element/docs run dev",
"build:docs": "pnpm --filter @gujiam-element/docs run build"
"build:docs": "pnpm --filter @gujiam-element/docs run build",
"test": "echo TODO"
},
"dependencies": {
"vue": "^3.4.37"
Expand Down

0 comments on commit e8d7c4c

Please sign in to comment.