name: Theme Cards Unit Test

on: [push]

jobs: 
  build: 
    runs-on: ubuntu-latest
    steps: 
      - name: Node.js envs
        uses: actions/setup-node@v4
        with:
          node-version: "22"
      - name: Generate
        run: |
          git clone https://github.com/hexojs/hexo-theme-unit-test.git test
          git clone https://github.com/ChrAlpha/hexo-theme-cards-unit-test.git theme
          cd ./test
          git clone https://github.com/ChrAlpha/hexo-theme-cards.git themes/cards
          npm install
          npx hexo clean && npx hexo generate
          cd ../theme
          git clone https://github.com/ChrAlpha/hexo-theme-cards.git themes/cards
          npm install
          npx hexo clean && npx hexo generate
