From 0d5e12e7aa083cdec1b8346bf888e0e87fda1293 Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Tue, 14 Jul 2026 22:57:17 +0700 Subject: [PATCH] chore: update deploy --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 67 ++++++++++++++++++++++++++++++++++++ .github/workflows/docker.yml | 44 ----------------------- .github/workflows/main.yml | 27 --------------- 4 files changed, 68 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/docker.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82ffa25a..175ddb35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ name: Build on: pull_request: - branches: ["main"] + branches: ["master"] jobs: build: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..9c903f82 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,67 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - master + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + build: + name: Build + if: github.repository == 'ton-blockchain/verifier' + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: Fetch Sources + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + + - name: Enable Corepack + run: corepack enable + + - name: Setup Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: 22.x + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: dist + + deploy: + name: Deploy + if: github.repository == 'ton-blockchain/verifier' + needs: [build] + runs-on: ubuntu-latest + + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 604e1168..00000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Build Docker Image - -on: - push: - branches: - - main - -jobs: - build-and-push: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=sha,format=short - type=ref,event=branch - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push image - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 8f0ce4a7..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Build and Deploy - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2.3.1 - - name: install dependencies - run: npm ci - - name: Build - run: CI=false npm run build - env: - VITE_APP_GA: ${{ secrets.GOOGLE_ANALYTICS }} - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - branch: gh-pages # The branch the action should deploy to. - folder: dist # The folder the action should deploy.