diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1d41230..90dace0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Deploy to GitHub Pages on: push: @@ -6,14 +6,20 @@ on: - deploy-test jobs: - deploy: - name: Deploy + build-and-deploy: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' steps: - - name: Deploy with gh-pages - run: | - git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - npm run deploy -- -u "github-actions-bot " + - uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '21' + + - name: Install dependencies + run: npm install + + - name: Build and Deploy + run: npm run deploy -- -u "github-actions-bot " env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}