diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0921b47..9d10370d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: Build on: workflow_dispatch: + workflow_call: pull_request: jobs: build: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8071b180..3dfd2eb1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,35 +6,16 @@ on: workflow_dispatch: jobs: build: - name: Build and Deploy - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - with: - fetch-depth: '0' - persist-credentials: false - submodules: 'recursive' - - name: Setup Node - uses: actions/setup-node@v2-beta - with: - node-version: '22' - - name: Build - run: npm install && npm run build - - name: Upload static files as artifact - id: deployment - uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action - with: - path: docs + name: Build + uses: ./.github/workflows/build.yml deploy: - environment: - name: Deploy + name: Deploy + runs-on: ubuntu-latest + needs: build permissions: contents: read pages: write id-token: write - runs-on: ubuntu-latest - needs: build steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/deploy_legacy.yml b/.github/workflows/deploy_legacy.yml index 303c46e4..8ec5bfdf 100644 --- a/.github/workflows/deploy_legacy.yml +++ b/.github/workflows/deploy_legacy.yml @@ -3,22 +3,12 @@ on: workflow_dispatch: jobs: build: - name: Build and Deploy - runs-on: ubuntu-latest + name: Build + uses: ./.github/workflows/build.yml + deploy: + name: Deploy steps: - - name: Checkout Repository - uses: actions/checkout@v2 - with: - fetch-depth: '0' - persist-credentials: false - submodules: 'recursive' - - name: Setup Node - uses: actions/setup-node@v2-beta - with: - node-version: '22' - - name: Build - run: npm install && npm run build - - name: Deploy + - name: Deploy to GitHub Pages (gh-pages branch) uses: JamesIves/github-pages-deploy-action@4.1.5 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}} with: