diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c6a6d0..75fe264 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,21 +1,41 @@ -name: Build and Deploy +name: Deploy Demo + on: push: - branches: - - main + branches: ['main'] + permissions: - contents: write + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + jobs: - pages: - concurrency: ci-${{ github.ref }} + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 with: - cache: npm - - run: npm install - - run: npm run build - - uses: JamesIves/github-pages-deploy-action@v4 + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build -- --base=/editor/ + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - folder: demo + path: './demo' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4