From a944164ddf532a7b4d1f4912a54feb7bb84e3ba0 Mon Sep 17 00:00:00 2001 From: Daniel Belmes Date: Tue, 18 Jun 2024 15:30:24 -0700 Subject: [PATCH] I think this will actually fix the issue we saw --- .github/workflows/branch-build.yml | 10 ++-- .github/workflows/documentation.yml | 91 ----------------------------- 2 files changed, 4 insertions(+), 97 deletions(-) delete mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/branch-build.yml b/.github/workflows/branch-build.yml index a3e652782c..78578a3f06 100755 --- a/.github/workflows/branch-build.yml +++ b/.github/workflows/branch-build.yml @@ -2,12 +2,10 @@ name: branch-build on: pull_request: branches: [dev] - paths: - - '**.ts' - - '**.tsx' - - '**.js' - - '**.jsx' - - '**.json' + push: + branches: [dev] + merge_group: + types: [checks_requested] jobs: secrets-gate: runs-on: ubuntu-latest diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index da7ae33f00..0000000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: documentation - -on: - pull_request: - branches: [dev] - push: - branches: [dev] - -jobs: - secrets-gate: - runs-on: ubuntu-latest - outputs: - ok: ${{ steps.check-secrets.outputs.ok }} - steps: - - name: check for secrets needed to run workflows - id: check-secrets - run: | - if [ ${{ secrets.DOCUMENTATION_BUILD_ENABLED }} == 'true' ]; then - echo "ok=enabled" >> $GITHUB_OUTPUT - fi - checks: - if: github.event_name != 'push' - runs-on: ubuntu-latest - env: - NODE_OPTIONS: --max_old_space_size=8192 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18.x - - name: Config npm registry token - run: npm config set '//npm.pkg.github.com/:_authToken' "${NPM_TOKEN}" - env: - NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: install main repository - run: npm install --legacy-peer-deps - - name: clone etherealengine docs - run: git clone https://github.com/etherealengine/etherealengine-docs.git docs - - name: install docs npm packages - working-directory: docs - run: npm install --legacy-peer-deps - - name: build docs - working-directory: docs - run: | - cp .env.local.default .env.local - npm run build - gh-release: - needs: - - secrets-gate - if: ${{ needs.secrets-gate.outputs.ok == 'enabled' && github.event_name != 'pull_request' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18.x - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} - - name: Config github npm registry token - run: npm config set '//npm.pkg.github.com/:_authToken' "${NPM_TOKEN}" - env: - NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Release to GitHub Pages - timeout-minutes: 200 - env: - NODE_OPTIONS: --max_old_space_size=16384 - USE_SSH: true - GIT_USER: git - DEPLOYMENT_BRANCH: gh-pages - run: | - git config --global user.email "actions@github.com" - git config --global user.name "gh-actions" - npm install --legacy-peer-deps - git clone git@github.com:etherealengine/etherealengine-docs.git docs - echo "Starting to remove commit history for gh-pages branch" - cd docs - latestMainCommit=$(git rev-parse HEAD) - git checkout gh-pages - git checkout --orphan temp-gh-pages - git add -A - git commit -m "Deploy website - based on ${latestMainCommit}" - git checkout gh-pages - git reset --hard temp-gh-pages - git push origin gh-pages --force - git branch -D temp-gh-pages - echo "gh-pages commit history has been cleared" - git checkout main - cp .env.local.default .env.local - npm install --legacy-peer-deps - npm run deploy