diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index c3f855e..ba8560d 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -3,30 +3,37 @@ name: Deploy demo on: [workflow_dispatch] permissions: - contents: write + contents: read + pages: write + id-token: write concurrency: group: 'pages' cancel-in-progress: false jobs: - build-and-deploy: - concurrency: ci-${{ github.ref }} + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ uses: actions/checkout@v3 - - name: Install Node 🍜 uses: actions/setup-node@v3 with: node-version: 18 - - - name: Install and Build 🔧 - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Install Deps 🔧 run: npm i --legacy-peer-deps - name: Build app for production 💥 run: npx nx build ngx-responsive-table-demo -c production - - name: Deploy to gh pages 🛫 - run: npm run deploy:ngx-responsive-table-demo + - name: Setup Pages 🔧 + uses: actions/configure-pages@v3 + - name: Upload artifact 🍜 + uses: actions/upload-pages-artifact@v2 + with: + path: 'dist/apps/ngx-responsive-table-demo' + - name: Deploy to GitHub Pages 💥 + id: deployment + uses: actions/deploy-pages@v2