Skip to content

Commit

Permalink
Fix working dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
remotemerge committed Jan 4, 2025
1 parent 123ab84 commit 1fff95a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 30 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
15 changes: 6 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
14 changes: 4 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 0 additions & 2 deletions html/maker/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

0 comments on commit 1fff95a

Please sign in to comment.