diff --git a/.github/workflows/to-github.-pages.yml b/.github/workflows/to-github.-pages.yml index 104de22..1c648fc 100644 --- a/.github/workflows/to-github.-pages.yml +++ b/.github/workflows/to-github.-pages.yml @@ -22,6 +22,29 @@ concurrency: cancel-in-progress: false jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + + - name: Install dependencies + uses: bahmutov/npm-install@v1 + + - name: Build project + run: npx vite build + + - name: Upload production-ready build files + uses: actions/upload-artifact@v3 + with: + name: production-files + path: ./dist + deploy: environment: name: github-pages @@ -31,19 +54,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Build js dependencies - uses: bahmutov/npm-install@v1 - - - run: npx vite build - - name: Setup Pages uses: actions/configure-pages@v3 - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + - name: Download artifact + uses: actions/download-artifact@v3 with: - path: '.' + name: production-files + path: ./dist - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 id: deployment - uses: actions/deploy-pages@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist