From 215516207b998bafa85588d315de25f1ecbf3042 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 00:02:06 -0500 Subject: [PATCH 01/44] FIX: I think i'm now verified. --- .github/workflows/minify.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index c0ff2fb..36fc592 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -16,8 +16,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '16' - - run: | - npm i -g terser csso-cli html-minifier + - run: npm i -g terser csso-cli html-minifier # Use CLI tools to minify, overwriting existing files - run: for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done From 654252b46e2377bd0e75003e8742eadd85b1062e Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 00:49:43 -0500 Subject: [PATCH 02/44] FIX: Adding pull request feature minify. --- .github/workflows/minify.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 36fc592..910bdf0 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,10 @@ jobs: - run: for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done # Push changes to `build` branch - - run: git config user.name ${{ github.actor }} - - run: git config user.email ${{ github.actor }}@user.noreply.github.com - - run: git commit -am 'Automated minify of ${{ github.sha }}' - - run: git push --force -u origin main:build + - name: Create report file + run: date +%s > report.txt + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v4 + with: + base: build From 4643b5eb5a26ca9a79fd12d4f91ac21d17b83249 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 00:52:45 -0500 Subject: [PATCH 03/44] _ From ca8e7145550784d2770357e8fa9bc0b74fb29cba Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 00:54:33 -0500 Subject: [PATCH 04/44] FIX: Added token to pull request --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 910bdf0..76d8d80 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -31,3 +31,4 @@ jobs: uses: peter-evans/create-pull-request@v4 with: base: build + token: ${{ GITHUB_TOKEN }} From f318d5a753ff09e6cf7b6d4d93b126f9173bfb65 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 00:55:52 -0500 Subject: [PATCH 05/44] FIX: Added token to pull request --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 76d8d80..8648b84 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -31,4 +31,4 @@ jobs: uses: peter-evans/create-pull-request@v4 with: base: build - token: ${{ GITHUB_TOKEN }} + token: ${{ $GITHUB_TOKEN }} From 09a08ee64c19c24924a503fbad854d7e555ce3d8 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 00:56:42 -0500 Subject: [PATCH 06/44] FIX: Added token to pull request --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 8648b84..8ddf6a4 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -31,4 +31,4 @@ jobs: uses: peter-evans/create-pull-request@v4 with: base: build - token: ${{ $GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} From 5940c567481de3a6e89b3905669f7405a2b21f2b Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:08:33 -0500 Subject: [PATCH 07/44] FEAT: Cleaned up Prepare GitHub action --- .github/workflows/minify.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 8ddf6a4..0eb93fa 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -1,5 +1,4 @@ -# A Github Action that minifies html/css/js and pushes it to a new branch -name: minify +name: Prepare for deployment. on: push: @@ -11,24 +10,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - # Install CLI tools - uses: actions/setup-node@v3 with: node-version: '16' - - run: npm i -g terser csso-cli html-minifier - # Use CLI tools to minify, overwriting existing files - - run: for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done - - run: for i in `find . -name "*.css" -type f`; do csso $i -o $i; done - - run: for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done + - name: Install dependencies. + run: npm i -g terser csso-cli html-minifier + + - name: Minify files. + run: | + for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done + for i in `find . -name "*.css" -type f`; do csso $i -o $i; done + for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - # Push changes to `build` branch - - name: Create report file - run: date +%s > report.txt - - - name: Create Pull Request + - name: Create pull request. uses: peter-evans/create-pull-request@v4 with: + commit-message: Minified HTML, CSS, JS. Prepared for production. + committer: github-actions + author: github-actions + title: Deploy changes from main branch. + body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. + assignees: MajorDroolz + reviewers: MajorDroolz base: build - token: ${{ secrets.GITHUB_TOKEN }} From d03bc6c9b4ec855997aafc6f3af7d47eb52ac211 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:12:52 -0500 Subject: [PATCH 08/44] FEAT: Cleaned up Prepare GitHub action --- .github/workflows/minify.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 0eb93fa..afbfb2e 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -27,8 +27,8 @@ jobs: uses: peter-evans/create-pull-request@v4 with: commit-message: Minified HTML, CSS, JS. Prepared for production. - committer: github-actions - author: github-actions + committer: github_actions + author: github_actions title: Deploy changes from main branch. body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz From ccdbd99143cec5d88e5eb41cea8623c0d8694bd7 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:14:53 -0500 Subject: [PATCH 09/44] FIX: Added comitter email to PR maker. --- .github/workflows/minify.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index afbfb2e..622a864 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -27,8 +27,8 @@ jobs: uses: peter-evans/create-pull-request@v4 with: commit-message: Minified HTML, CSS, JS. Prepared for production. - committer: github_actions - author: github_actions + committer: github-actions + author: github-actions title: Deploy changes from main branch. body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz From 6ea58e0466fa667186f48ffe76332c52d0e95b23 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:20:22 -0500 Subject: [PATCH 10/44] FIX: added custom branch PR name. --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 622a864..3815d16 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -33,4 +33,5 @@ jobs: body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz reviewers: MajorDroolz + branch: temp base: build From 7d924db08f12c2bd9fb71446a7dcc0cbe1c64690 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:22:58 -0500 Subject: [PATCH 11/44] FIX: minify --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 3815d16..aadf6e9 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -26,6 +26,7 @@ jobs: - name: Create pull request. uses: peter-evans/create-pull-request@v4 with: + token: ${{ secrets.GITHUB_TOKEN }} commit-message: Minified HTML, CSS, JS. Prepared for production. committer: github-actions author: github-actions From c3c7487062c63e1862ca3675ffd6d49c7a30efd7 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:31:00 -0500 Subject: [PATCH 12/44] FIX: minify --- .github/workflows/minify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index aadf6e9..e3cb6f8 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -34,5 +34,4 @@ jobs: body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz reviewers: MajorDroolz - branch: temp base: build From cbdc8096f7d36d426e93b0dd9a7fbaf55cb00a7d Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:32:53 -0500 Subject: [PATCH 13/44] FIX: minify --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index e3cb6f8..aadf6e9 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -34,4 +34,5 @@ jobs: body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz reviewers: MajorDroolz + branch: temp base: build From d47da268bc3502eb0d17b401fb975e6ac7a55288 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:35:14 -0500 Subject: [PATCH 14/44] FIX: minify --- .github/workflows/minify.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index aadf6e9..b308f01 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -34,5 +34,3 @@ jobs: body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz reviewers: MajorDroolz - branch: temp - base: build From b47e3779eb3b99cdb406013eeccafeeeea613026 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:36:21 -0500 Subject: [PATCH 15/44] FIX: minify --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index b308f01..85eacf0 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -34,3 +34,4 @@ jobs: body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. assignees: MajorDroolz reviewers: MajorDroolz + branch: temp From 045e7df19246876bbd0bbec645f02d24e803c8e1 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:41:34 -0500 Subject: [PATCH 16/44] FIX: minify --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 85eacf0..aadf6e9 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -35,3 +35,4 @@ jobs: assignees: MajorDroolz reviewers: MajorDroolz branch: temp + base: build From d63787e036a3ec48deab7932a2b5fa11b3b0aa01 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:53:55 -0500 Subject: [PATCH 17/44] FIX: minify --- .github/workflows/minify.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index aadf6e9..c9d664a 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: build + - uses: actions/setup-node@v3 with: node-version: '16' @@ -17,6 +20,9 @@ jobs: - name: Install dependencies. run: npm i -g terser csso-cli html-minifier + - name: Copy over changes. + run: git merge -s theirs main + - name: Minify files. run: | for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done @@ -35,4 +41,3 @@ jobs: assignees: MajorDroolz reviewers: MajorDroolz branch: temp - base: build From fd3e696013393e5b54454266df8fee3d4db3a7db Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:58:22 -0500 Subject: [PATCH 18/44] FIX: minify --- .github/workflows/minify.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index c9d664a..c58fdfb 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -21,7 +21,9 @@ jobs: run: npm i -g terser csso-cli html-minifier - name: Copy over changes. - run: git merge -s theirs main + run: | + git reset HEAD^ + git pull main - name: Minify files. run: | From 8c98739f743e440d808fc81d41864376d8a12f79 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 01:59:33 -0500 Subject: [PATCH 19/44] FIX: minify --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index c58fdfb..b4def58 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -22,7 +22,7 @@ jobs: - name: Copy over changes. run: | - git reset HEAD^ + git reset --hard HEAD^ git pull main - name: Minify files. From c3813912008ec58b202b97af41c10aba132274fe Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:01:46 -0500 Subject: [PATCH 20/44] FIX: minify --- .github/workflows/minify.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index b4def58..4e0df89 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v3 with: ref: build + fetch-depth: '3' - uses: actions/setup-node@v3 with: From 76dca5a1beea8ef638ea088e7da3d67833a0ea35 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:02:52 -0500 Subject: [PATCH 21/44] FIX: minify --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 4e0df89..302018a 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,7 @@ jobs: - name: Copy over changes. run: | git reset --hard HEAD^ - git pull main + git pull main:main - name: Minify files. run: | From 91aa1535fab57efa01c6ccad9cd9afd6f745c6e2 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:07:49 -0500 Subject: [PATCH 22/44] FIX: minify --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 302018a..a0affde 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,7 @@ jobs: - name: Copy over changes. run: | git reset --hard HEAD^ - git pull main:main + git pull origin main - name: Minify files. run: | From 0bd0431a856126b7d01ed31d65e615ac9c9b8ded Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:12:29 -0500 Subject: [PATCH 23/44] TEST: See if the action works now. --- resume/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resume/index.html b/resume/index.html index 71b4b10..181e82e 100644 --- a/resume/index.html +++ b/resume/index.html @@ -151,11 +151,11 @@
  • Foundations of Computer Science
  • Rensselaer Center for Open Source
  • +
  • Physics I
  • Calculus II
  • Introduction to Logic
  • Language and Power
  • Calculus I
  • -
  • Physics I
  • Data Structures
From e261dbb2e80a6ed55883bf33d8847d10295d64a5 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:17:32 -0500 Subject: [PATCH 24/44] FIX: Specify rebase config. --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index a0affde..e315154 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,7 @@ jobs: - name: Copy over changes. run: | git reset --hard HEAD^ - git pull origin main + git pull --rebase origin main - name: Minify files. run: | From e39da6d72418bf8a060f227d1344a7d95703d4f0 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:20:25 -0500 Subject: [PATCH 25/44] FIX: Merge minify. --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index e315154..8e9f4b7 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,7 @@ jobs: - name: Copy over changes. run: | git reset --hard HEAD^ - git pull --rebase origin main + git merge --strategy=theirs origin main - name: Minify files. run: | From 2f08fa7e785f2074f47022e82febc6c40433f4ce Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:23:49 -0500 Subject: [PATCH 26/44] FIX: Merge minify. --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 8e9f4b7..77c74f7 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,7 @@ jobs: - name: Copy over changes. run: | git reset --hard HEAD^ - git merge --strategy=theirs origin main + git merge -Xtheirs origin main - name: Minify files. run: | From af34e0746f9863ca6165c24b1797263afb01cc12 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:25:55 -0500 Subject: [PATCH 27/44] FIX: Merge minify. --- .github/workflows/minify.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 77c74f7..db48ad1 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -24,7 +24,8 @@ jobs: - name: Copy over changes. run: | git reset --hard HEAD^ - git merge -Xtheirs origin main + git fetch origin main + git merge -Xtheirs - name: Minify files. run: | From 6077bf7d69ac33bdfeca968a4a8537a9c0748920 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:27:19 -0500 Subject: [PATCH 28/44] FIX: Merge minify. --- resume/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resume/index.html b/resume/index.html index 181e82e..9acf7fe 100644 --- a/resume/index.html +++ b/resume/index.html @@ -152,10 +152,10 @@
  • Foundations of Computer Science
  • Rensselaer Center for Open Source
  • Physics I
  • +
  • Calculus I
  • Calculus II
  • Introduction to Logic
  • Language and Power
  • -
  • Calculus I
  • Data Structures
  • From 479bc75c621f48ad130cb6ce5135e664bc09fbcd Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:32:46 -0500 Subject: [PATCH 29/44] FIX: Merge minify. --- .github/workflows/minify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index db48ad1..c3870fc 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -23,9 +23,9 @@ jobs: - name: Copy over changes. run: | - git reset --hard HEAD^ - git fetch origin main - git merge -Xtheirs + git branch -D build + git branch build + git checkout build - name: Minify files. run: | From d7e5e870b64e8e99b68753c501e7764577096758 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 02:34:10 -0500 Subject: [PATCH 30/44] FIX: Merge minify. --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index c3870fc..ba1c7cf 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: build + ref: main fetch-depth: '3' - uses: actions/setup-node@v3 From 757a20bd05862a840db87cb738c5950d20dfb30c Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:07:48 -0500 Subject: [PATCH 31/44] FIX: Merge minify. --- .github/workflows/minify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index ba1c7cf..9c91c43 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -23,7 +23,6 @@ jobs: - name: Copy over changes. run: | - git branch -D build git branch build git checkout build From 42ff2e2e7ff1b2c842950928ad4a114f76386c96 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:18:31 -0500 Subject: [PATCH 32/44] FIX: Merge minify. --- .github/workflows/minify.yml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 9c91c43..970aa3a 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -10,10 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - ref: main - fetch-depth: '3' - - uses: actions/setup-node@v3 with: node-version: '16' @@ -21,10 +17,10 @@ jobs: - name: Install dependencies. run: npm i -g terser csso-cli html-minifier - - name: Copy over changes. - run: | - git branch build - git checkout build + - run: | + git branch -D -q temp + git branch temp + git checkout temp - name: Minify files. run: | @@ -32,15 +28,4 @@ jobs: for i in `find . -name "*.css" -type f`; do csso $i -o $i; done for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - - name: Create pull request. - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Minified HTML, CSS, JS. Prepared for production. - committer: github-actions - author: github-actions - title: Deploy changes from main branch. - body: Automated with [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action. - assignees: MajorDroolz - reviewers: MajorDroolz - branch: temp + - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" From 2ab8f520438cb1f0904b774f698f71833e931798 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:19:10 -0500 Subject: [PATCH 33/44] FIX: Merge minify. --- .github/workflows/minify.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 970aa3a..3dbcbc2 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -28,4 +28,6 @@ jobs: for i in `find . -name "*.css" -type f`; do csso $i -o $i; done for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done + - run: git commit -am "STUFF" + - run: git push -f - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" From fa9cdbf1b0a1d1ee406d319732984aaed2054bce Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:19:48 -0500 Subject: [PATCH 34/44] FIX: Merge minify. --- .github/workflows/minify.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 3dbcbc2..e6a724c 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -18,7 +18,6 @@ jobs: run: npm i -g terser csso-cli html-minifier - run: | - git branch -D -q temp git branch temp git checkout temp From c774126cc01321fad2bdd78db943298c1df91ad1 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:20:38 -0500 Subject: [PATCH 35/44] FIX: Merge minify. --- .github/workflows/minify.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index e6a724c..d5f34d1 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -27,6 +27,9 @@ jobs: for i in `find . -name "*.css" -type f`; do csso $i -o $i; done for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - - run: git commit -am "STUFF" + - run: | + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + git commit -am "STUFF" - run: git push -f - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" From dc5d419cc585a57400020a041edcb581403883d3 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:21:27 -0500 Subject: [PATCH 36/44] FIX: Merge minify. --- .github/workflows/minify.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index d5f34d1..165826f 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -31,5 +31,7 @@ jobs: git config --global user.email "you@example.com" git config --global user.name "Your Name" git commit -am "STUFF" - - run: git push -f + - run: | + git push --set-upstream origin temp + git push -f - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" From 05dee3e769dbbfd533787bb89f679f54a4e4e0ab Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:22:20 -0500 Subject: [PATCH 37/44] FIX: Merge minify. --- .github/workflows/minify.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 165826f..dd1bcb9 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -32,6 +32,5 @@ jobs: git config --global user.name "Your Name" git commit -am "STUFF" - run: | - git push --set-upstream origin temp - git push -f + git push -f --set-upstream origin temp - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" From 28fb447c6c0b92cb3d981ef596f5eab35ddf134c Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:23:34 -0500 Subject: [PATCH 38/44] FIX: Merge minify. --- .github/workflows/minify.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index dd1bcb9..a651fc3 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -8,6 +8,8 @@ on: jobs: minify: runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 From ed9f766a41abfee5d403b9c186e4a9332f86e88d Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:25:30 -0500 Subject: [PATCH 39/44] FIX: Merge minify. --- .github/workflows/minify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index a651fc3..7fdffe4 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -34,5 +34,5 @@ jobs: git config --global user.name "Your Name" git commit -am "STUFF" - run: | - git push -f --set-upstream origin temp + git push -f --set-upstream origin temp - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" From 6a9086cf34953438a8e192b7a98106b4743ea3d0 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:48:59 -0500 Subject: [PATCH 40/44] FIX: Merge minify. --- .github/workflows/minify.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 7fdffe4..6de88f5 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -12,6 +12,9 @@ jobs: GH_TOKEN: ${{ github.token }} steps: - uses: actions/checkout@v3 + with: + token: ${{ secret.SECRET }} + - uses: actions/setup-node@v3 with: node-version: '16' @@ -19,9 +22,7 @@ jobs: - name: Install dependencies. run: npm i -g terser csso-cli html-minifier - - run: | - git branch temp - git checkout temp + - run: git checkout -b build - name: Minify files. run: | @@ -30,9 +31,7 @@ jobs: for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - run: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" + git config user.email "noreply@github.com" + git config user.name "github-actions" git commit -am "STUFF" - - run: | - git push -f --set-upstream origin temp - - run: gh pr create --title "Pull request title" --body "Pull request body" --base "build" + - run: git push -f --set-upstream origin build From 0b37cca2d636b295fe6b0a8eb29a2505c98553bf Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:51:25 -0500 Subject: [PATCH 41/44] FIX: Merge minify. --- .github/workflows/minify.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index 6de88f5..a031453 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -8,12 +8,11 @@ on: jobs: minify: runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ github.token }} + steps: - uses: actions/checkout@v3 with: - token: ${{ secret.SECRET }} + token: ${{ secrets.SECRET }} - uses: actions/setup-node@v3 with: From fd2e6ea34e51aac8ef6b327285d963b439e19b0a Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:53:20 -0500 Subject: [PATCH 42/44] FIX: Merge minify. --- .github/workflows/minify.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index a031453..c54981c 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -29,8 +29,5 @@ jobs: for i in `find . -name "*.css" -type f`; do csso $i -o $i; done for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - - run: | - git config user.email "noreply@github.com" - git config user.name "github-actions" - git commit -am "STUFF" + - run: git commit -am "STUFF" - run: git push -f --set-upstream origin build From e028df17af7168aefde63d49f45998be67246f75 Mon Sep 17 00:00:00 2001 From: MajorDroolz Date: Tue, 20 Dec 2022 03:56:00 -0500 Subject: [PATCH 43/44] FEAT: Working minify workflow using github actions. --- .github/workflows/minify.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/minify.yml diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml deleted file mode 100644 index c54981c..0000000 --- a/.github/workflows/minify.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Prepare for deployment. - -on: - push: - branches: - - 'main' - -jobs: - minify: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.SECRET }} - - - uses: actions/setup-node@v3 - with: - node-version: '16' - - - name: Install dependencies. - run: npm i -g terser csso-cli html-minifier - - - run: git checkout -b build - - - name: Minify files. - run: | - for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done - for i in `find . -name "*.css" -type f`; do csso $i -o $i; done - for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done - - - run: git commit -am "STUFF" - - run: git push -f --set-upstream origin build From af212f4e21c6e7c76cc217906c2455eccb391de1 Mon Sep 17 00:00:00 2001 From: MajorDroolz <85373160+MajorDroolz@users.noreply.github.com> Date: Tue, 20 Dec 2022 03:58:25 -0500 Subject: [PATCH 44/44] Create prepare.yml --- .github/workflows/prepare.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/prepare.yml diff --git a/.github/workflows/prepare.yml b/.github/workflows/prepare.yml new file mode 100644 index 0000000..018a3fd --- /dev/null +++ b/.github/workflows/prepare.yml @@ -0,0 +1,40 @@ +name: Prepare changes for deployment. + +on: + push: + branches: + - 'main' + +jobs: + prepare: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.SECRET }} + + - uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install dependencies. + run: npm i -g terser csso-cli html-minifier + + - name: "Copying changes over to build." + run: git checkout -b build + + - name: Minify files. + run: | + for i in `find . -name "*.js" -type f`; do terser $i --compress -o $i; done + for i in `find . -name "*.css" -type f`; do csso $i -o $i; done + for i in `find . -name "*.html" -type f`; do html-minifier --remove-comments --collapse-whitespace $i -o $i; done + + - name: "Commiting changes." + run: | + git config user.email "noreply@github.com" + git config user.name "github-actions" + git commit -am "Preparing changes for deployment." + + - name: "Pushing changes." + run: git push -f --set-upstream origin build