diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 01ad628..cb458e4 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -18,12 +18,6 @@ jobs: node-version: [18, 20, 22] fail-fast: false - # Set default values for the jobs - defaults: - run: - shell: bash - working-directory: ./html - steps: # Checkout the repository - uses: actions/checkout@v4 @@ -34,10 +28,10 @@ jobs: node-version: ${{ matrix.node-version }} - name: Generate package.json file - run: npm init -y + run: cd html && npm init -y - name: Install Nepali Date Converter - run: npm install @remotemerge/nepali-date-converter + run: cd html && npm install @remotemerge/nepali-date-converter - name: List installed packages - run: npm list --depth=0 + run: cd html && npm list --depth=0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0a2dfbd..21c0492 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,12 +12,6 @@ jobs: # Run on the latest Ubuntu runs-on: ubuntu-latest - # Set default values for the jobs - defaults: - run: - shell: bash - working-directory: ./html - steps: # Checkout the repository - uses: actions/checkout@v4 @@ -29,12 +23,15 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: Install dependencies - run: npm install + run: cd html && npm install - name: Build project - run: npm run build + run: cd html && npm run build + + - name: Copy Documentation and License + run: cp README.md LICENSE html/dist - name: Publish the package to npm - run: npm publish ./dist --access public + run: cd html && npm publish ./dist --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b23a13..44c0616 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,12 +13,6 @@ jobs: node-version: [ 18, 20, 22 ] fail-fast: false - # Set default values for the jobs - defaults: - run: - shell: bash - working-directory: ./html - steps: # Checkout the repository - uses: actions/checkout@v4 @@ -29,13 +23,13 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies - run: npm install + run: cd html && npm install - name: Build project - run: npm run build + run: cd html && npm run build - name: Create data file - run: npx shx cp __tests__/data.dist.json __tests__/data.json + run: cd html && npx shx cp __tests__/data.dist.json __tests__/data.json - name: Run Tests - run: npm run test + run: cd html && npm run test diff --git a/html/maker/package-manager.ts b/html/maker/package-manager.ts index 6fd9278..ad1f637 100644 --- a/html/maker/package-manager.ts +++ b/html/maker/package-manager.ts @@ -64,5 +64,3 @@ await writeFile( // Copy static files to the dist folder await copyFile('.npmrc', join(distPath, '.npmrc')); -await copyFile('../../README.md', join(distPath, 'README.md')); -await copyFile('../../LICENSE', join(distPath, 'LICENSE'));