From 1100120ddc87385506e7d060d42af651c7595754 Mon Sep 17 00:00:00 2001 From: Yiming <94727727+yimingWOW@users.noreply.github.com> Date: Sat, 11 Jan 2025 17:14:33 +0800 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..de0ac3a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,45 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + permissions: + contents: write # 添加写入权限 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install Dependencies + run: | + cd app + npm install + npm install --save @solana/spl-token + npm install --save @project-serum/anchor + npm install --save-dev @types/bn.js + + - name: Build + run: | + cd app + npm run build + env: + CI: false + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: app/dist + branch: gh-pages + token: ${{ secrets.ACCESS_TOKEN }}