From bd6400422a07395b8fe81e4e81c7d5b801a0d06e Mon Sep 17 00:00:00 2001 From: Jon Andre Briones Date: Tue, 2 Sep 2025 09:59:47 -0700 Subject: [PATCH] Chore: Updated the GitHub Actions for `main` branch --- .github/workflows/deploy-to-test.yml | 3 +- .github/workflows/ng-deploy-to-test.yml | 49 ------------------------- 2 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/ng-deploy-to-test.yml diff --git a/.github/workflows/deploy-to-test.yml b/.github/workflows/deploy-to-test.yml index 1b0e3253..c780b05b 100644 --- a/.github/workflows/deploy-to-test.yml +++ b/.github/workflows/deploy-to-test.yml @@ -23,7 +23,8 @@ jobs: - run: npm run build --if-present - name: Preserve build output when moving branches - run: mv build ../build-tmp + # If this is not done then the build folder will be lost when we switch branches + run: mv dist/csss-ng-frontend/browser ../build-tmp - name: Switch to the build branch and clean it run: | diff --git a/.github/workflows/ng-deploy-to-test.yml b/.github/workflows/ng-deploy-to-test.yml deleted file mode 100644 index fbc756af..00000000 --- a/.github/workflows/ng-deploy-to-test.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Builds and pushes the results to the `ng-build` branch when a pull request is merged into `ng-rewrite` - -on: - pull_request: - types: [closed] - branches: - - ng-rewrite - -jobs: - deploy-to-branch: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - - steps: - - name: Checkout `develop` - uses: actions/checkout@v4 - - - name: Set up Node.js, install dependencies and build - uses: actions/setup-node@v4 - with: - node-version: '22.x' - - run: npm ci - - run: npm run build - - - name: Preserve build output when moving branches - run: mv dist/csss-ng-frontend/browser ../build-tmp - - - name: Switch to the build branch and clean it - run: | - # Based off the script `./scripts/deploy_to_branch.sh` - # The branch we are publishing to - git fetch origin test - git switch test - rm -rf * - - - name: Copy the built files over to the root directory and push to `test` - run: | - # Set up a dummy user and email for identification purposes - cp -R ../build-tmp/* . - - - name: Commit and push - run: | - git config --global user.name "${{ github.actor }}" - git config --global user.email "${{ github.actor }}@user.noreply.github.com" - git add . - git commit -m "Updating `test` with PR#${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}" - git push origin test - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}