diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a8c02d6..0c457f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,17 +8,25 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v3 - - name: Install and Build - run: | - npm install - npm run build + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 with: - branch: gh-pages - folder: dist + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist diff --git a/package.json b/package.json index c6fbccc..dcfa2d5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "homepage": "https://vpavlenko.github.io/j/", "scripts": { "dev": "vite", - "build": "tsc -b && vite build", + "build": "tsc && vite build", "lint": "eslint .", "preview": "vite preview", "predeploy": "npm run build", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f1dde4..7c639c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,7 +35,7 @@ devDependencies: specifier: ^0.4.9 version: 0.4.12(eslint@9.11.1) gh-pages: - specifier: ^6.1.1 + specifier: ^X.X.X version: 6.1.1 globals: specifier: ^15.9.0