From 395b224bd5c1443417ecf138104cfc9fe3b85759 Mon Sep 17 00:00:00 2001 From: Pavel Lozinsky Date: Mon, 23 Oct 2023 18:20:23 +0200 Subject: [PATCH] chore: replace `build-and-publish` workflow with `build-and-deploy` --- .github/workflows/build-and-deploy.yml | 45 +++++++++++++++++++++++++ .github/workflows/build-and-publish.yml | 26 -------------- 2 files changed, 45 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/build-and-deploy.yml delete mode 100644 .github/workflows/build-and-publish.yml diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..339e720 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,45 @@ +name: Build and deploy + +on: + push: + tags: + - 'v*.*.*' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: false + +jobs: + build-and-deploy: + name: Build and deploy + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deploy.outputs.page_url }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prepare + uses: ./.github/actions/prepare + + - name: Build + run: npm run build + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: './dist/' + + - name: Deploy + id: deploy + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml deleted file mode 100644 index cbb98b0..0000000 --- a/.github/workflows/build-and-publish.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build and publish - -on: - push: - tags: - - 'v*.*.*' - -jobs: - publish: - name: Publish - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Prepare - uses: ./.github/actions/prepare - - - name: Build - run: npm run build - - - name: Publish - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: dist