From b49928c1c2fabdbc4f47af4b4a8073248cec8dba Mon Sep 17 00:00:00 2001 From: Tommy Alhamra Date: Thu, 5 Dec 2024 14:30:38 +0700 Subject: [PATCH] fix: config deploy --- .github/workflows/github-actions-deploy.yml | 66 ++++----------------- 1 file changed, 12 insertions(+), 54 deletions(-) diff --git a/.github/workflows/github-actions-deploy.yml b/.github/workflows/github-actions-deploy.yml index 4d020d6..942de04 100644 --- a/.github/workflows/github-actions-deploy.yml +++ b/.github/workflows/github-actions-deploy.yml @@ -5,17 +5,6 @@ on: branches: - rc -# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: 'pages' - cancel-in-progress: true - jobs: build: name: Build @@ -42,51 +31,20 @@ jobs: path: ./dist deploy: - # name: Deploy - # needs: build - # runs-on: ubuntu-latest - # if: github.ref == 'refs/heads/main' - - # steps: - # - name: Download artifact - # uses: actions/download-artifact@v4 - # with: - # name: production-files - # path: ./dist - - # - name: Deploy to GitHub Pages - # uses: peaceiris/actions-gh-pages@v3 - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: ./dist - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + name: Deploy + needs: build runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Node - uses: actions/setup-node@v3 - with: - node-version: 16 + if: github.ref == 'refs/heads/main' - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build - - - name: Setup Pages - uses: actions/configure-pages@v4 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + steps: + - name: Download artifact + uses: actions/download-artifact@v4 with: - # Upload dist folder - path: './dist' + name: production-files + path: ./dist - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist \ No newline at end of file