From f175b1a1c2a82d04565deb1afca46cecd6a892a7 Mon Sep 17 00:00:00 2001 From: hitchhooker Date: Fri, 16 Aug 2024 13:02:14 +0700 Subject: [PATCH] fix ci --- .github/workflows/deploy_pages.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy_pages.yaml b/.github/workflows/deploy_pages.yaml index 94d601d..663f565 100644 --- a/.github/workflows/deploy_pages.yaml +++ b/.github/workflows/deploy_pages.yaml @@ -1,44 +1,44 @@ name: Deploy to GitHub Pages - on: push: branches: [master] pull_request: branches: [master] workflow_dispatch: - env: NODE_VERSION: '18' - jobs: build-and-deploy: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v4 - + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} cache: 'npm' - + cache-dependency-path: './www/package-lock.json' + - name: Install dependencies - run: npm ci - + run: | + cd www + npm ci + - name: Build project - run: npm run build + run: | + cd www + npm run build env: VITE_MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} - + - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' with: - #github_token: ${{ secrets.GH_PAT }} github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + publish_dir: ./www/dist commit_message: ${{ github.event.head_commit.message }} force_orphan: true