diff --git a/.deepsource.toml b/.deepsource.toml deleted file mode 100644 index ab83cca9..00000000 --- a/.deepsource.toml +++ /dev/null @@ -1,14 +0,0 @@ -version = 1 -exclude_patterns = [ - "dist", - "bundle.js", - "build.js" -] - -[[analyzers]] -name = "javascript" -enabled = true - -[[analyzers]] -name = "shell" -enabled = true \ No newline at end of file diff --git a/.github/workflows/test-build.yml b/.github/workflows/beta-build.yml similarity index 65% rename from .github/workflows/test-build.yml rename to .github/workflows/beta-build.yml index f3aec2e3..15b9edc2 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/beta-build.yml @@ -1,10 +1,16 @@ -name: Test Build +name: Beta Build on: pull_request: + types: + - labeled + - opened + - synchronize + - reopened jobs: build: + if: contains(github.event.pull_request.labels.*.name, 'beta') name: Build runs-on: ubuntu-latest permissions: @@ -20,7 +26,6 @@ jobs: uses: actions/checkout@v3 with: token: ${{ secrets.DISPATCH_REPO }} - fetch-depth: 0 - name: Webpack run: | @@ -36,6 +41,7 @@ jobs: [ "${1}" != ".." ] && [ "${1}" != "./.git" ] && [ "${1}" != "./docs" ] && + [ "${1}" != "./beta" ] && [ "${1}" != "./LICENSE" ] && [ "${1}" != "./README.md" ]; then rm -rf ${1}; @@ -43,21 +49,18 @@ jobs: } export -f prune find . -maxdepth 1 | while read file; do prune ${file}; done - rm docs/index.html docs/404.html - mv docs/beta/index.html docs/index.html - mv docs/beta/404.html docs/404.html - - - name: Update CNAME - run : | - echo "beta.gitlang.net" > ./docs/CNAME + rm docs/index.html docs/404.html docs/CNAME + mv beta/index.html beta/404.html beta/CNAME docs/ + mkdir .github .github/workflows + mv beta/beta-compile.yml beta/beta-branch.yml .github/workflows/ - name: Push to Beta run: | git config user.name "Mikl Wolfe" git config user.email "wolfemikl@gmail.com" git remote set-url --add --push origin https://github.com/chiefmikey/gitlang-beta.git - git add docs - git commit -am 'Update test build' - git push -fu origin HEAD:main - echo "Pushed to https://github.com/chiefmikey/gitlang-beta" + git add . + git commit -am 'Build beta branch' + git reset $(git commit-tree HEAD^{tree} -m 'Update beta branch') + git push -fu origin HEAD:refs/heads/${{ github.head_ref }} echo "https://beta.gitlang.net" diff --git a/.github/workflows/client-build.yml b/.github/workflows/prod-build.yml similarity index 96% rename from .github/workflows/client-build.yml rename to .github/workflows/prod-build.yml index e69c3c50..b8756c2c 100644 --- a/.github/workflows/client-build.yml +++ b/.github/workflows/prod-build.yml @@ -1,4 +1,4 @@ -name: Client Build +name: Production Build on: push: @@ -49,6 +49,6 @@ jobs: run: | git config user.name "Mikl Wolfe" git config user.email "wolfemikl@gmail.com" - git add docs + git add . git commit -am 'Update production build' git push -fu origin HEAD:client diff --git a/docs/beta/404.html b/beta/404.html similarity index 100% rename from docs/beta/404.html rename to beta/404.html diff --git a/beta/CNAME b/beta/CNAME new file mode 100644 index 00000000..48bd5b3e --- /dev/null +++ b/beta/CNAME @@ -0,0 +1 @@ +beta.gitlang.net diff --git a/beta/beta-branch.yml b/beta/beta-branch.yml new file mode 100644 index 00000000..22733409 --- /dev/null +++ b/beta/beta-branch.yml @@ -0,0 +1,27 @@ +name: Beta Branch + +on: + create + +jobs: + build: + name: Branch + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.DISPATCH_REPO }} + + - name: Open PR + run: | + echo test: ${{ github.head_ref }} + gh pr create diff --git a/beta/beta-compile.yml b/beta/beta-compile.yml new file mode 100644 index 00000000..fe9fa349 --- /dev/null +++ b/beta/beta-compile.yml @@ -0,0 +1,40 @@ +name: Beta Compile + +on: + pull_request: + +jobs: + build: + name: Compile + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.DISPATCH_REPO }} + fetch-depth: 0 + + - name: Merge branches + run: | + git checkout -b beta-compile + echo $(gh pr list -s open --json) + for pull_request in $(gh pr list -s open --json branch); do + echo "Merge ${pull_request}" + git merge origin/${pull_request} + done + + - name: Push to Main + run: | + git config user.name "Mikl Wolfe" + git config user.email "wolfemikl@gmail.com" + git add . + git commit -am 'Beta compile' + git push -u origin HEAD:main diff --git a/docs/beta/index.html b/beta/index.html similarity index 100% rename from docs/beta/index.html rename to beta/index.html