diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 51f4805..18595cb 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,4 +1,4 @@ -name: GitHub Pages +name: Deploy WEB3-Glossary-Website on: workflow_dispatch: @@ -15,9 +15,10 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }} steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Setup Node + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '21' @@ -30,10 +31,13 @@ jobs: restore-keys: | ${{ runner.os }}-node- - - run: npm ci - - run: npm run build + - name: Install dependencies + run: npm ci - - name: Deploy + - name: Build project + run: npm run build + + - name: Deploy to GP uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 9039acb..7a79f53 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "serve": "vite preview", "test": "vitest", "test:coverage": "vitest run --coverage --watch=false", - "extract": "i18next-scanner --config i18next-scanner.config.js" + "extract": "i18next-scanner --config i18next-scanner.config.js", + "deploy": "gh-pages -d dist" }, "eslintConfig": { "extends": [ @@ -58,6 +59,7 @@ "react-dom": "^18.3.1", "serve": "^14.2.0", "vite": "^5.1.6", - "vitest": "^1.3.1" + "vitest": "^1.3.1", + "gh-pages":"^4.0.0" } }