From 6d148da260e5d276554e1aeb441d618c68ac0736 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 07:28:43 -0600 Subject: [PATCH 01/15] Add forgejo workflows --- .forgejo/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ .forgejo/workflows/test.yml | 21 +++++++++++++++++++++ .github/workflows/test.yml | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/deploy.yml create mode 100644 .forgejo/workflows/test.yml diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..8666cbe --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Build and Deploy +on: + push: + branches: + - 'main' + workflow_dispatch: +jobs: + build-and-deploy: + if: github.repository != 'profectus-engine/Profectus' # Don't build placeholder mod on main repo + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. + run: | + npm ci + npm run build + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4.2.5 + with: + branch: pages # The branch the action should deploy to. + folder: dist # The folder the action should deploy. diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..c41d085 --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,21 @@ +name: Run Tests +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de6f71a..c41d085 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: pull_request: branches: [ main ] jobs: - build: + test: runs-on: ubuntu-latest steps: -- 2.45.2 From 312cab1347e5513bf563283a9346262aa4f77d05 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 07:42:28 -0600 Subject: [PATCH 02/15] Rename workflow files --- .forgejo/workflows/{deploy.yml => deploy.yaml} | 0 .forgejo/workflows/{test.yml => test.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .forgejo/workflows/{deploy.yml => deploy.yaml} (100%) rename .forgejo/workflows/{test.yml => test.yaml} (100%) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yaml similarity index 100% rename from .forgejo/workflows/deploy.yml rename to .forgejo/workflows/deploy.yaml diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yaml similarity index 100% rename from .forgejo/workflows/test.yml rename to .forgejo/workflows/test.yaml -- 2.45.2 From d16bb55c3cb67a1ff05b44c04f8d4851e35bf10e Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 07:46:30 -0600 Subject: [PATCH 03/15] Update runs-on --- .forgejo/workflows/test.yaml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index c41d085..33df8d8 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -6,7 +6,7 @@ on: branches: [ main ] jobs: test: - runs-on: ubuntu-latest + runs-on: docker steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c41d085..33df8d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: branches: [ main ] jobs: test: - runs-on: ubuntu-latest + runs-on: docker steps: - uses: actions/checkout@v3 -- 2.45.2 From acf1d24c150ceb82821b821f2ea4d3ae7aa01b41 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 08:27:35 -0600 Subject: [PATCH 04/15] Changed one of the wrong runs-on --- .forgejo/workflows/deploy.yaml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 8666cbe..a0fcd36 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -7,7 +7,7 @@ on: jobs: build-and-deploy: if: github.repository != 'profectus-engine/Profectus' # Don't build placeholder mod on main repo - runs-on: ubuntu-latest + runs-on: docker steps: - name: Checkout 🛎️ uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33df8d8..c41d085 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: branches: [ main ] jobs: test: - runs-on: docker + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 -- 2.45.2 From 65ff440e254623045490508eb05379e60fe1fb02 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 08:42:39 -0600 Subject: [PATCH 05/15] Fully qualify pages deploy action --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index a0fcd36..edd50aa 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -20,7 +20,7 @@ jobs: npm run build - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.2.5 + uses: https://github.com/JamesIves/github-pages-deploy-action@v4.2.5 with: branch: pages # The branch the action should deploy to. folder: dist # The folder the action should deploy. -- 2.45.2 From 7330a6bda48b935ccc3fe343a9b1d95ffc2eddae Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 09:09:47 -0600 Subject: [PATCH 06/15] Switch image to ubuntu:latest --- .forgejo/workflows/deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index edd50aa..9eb9569 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -8,6 +8,7 @@ jobs: build-and-deploy: if: github.repository != 'profectus-engine/Profectus' # Don't build placeholder mod on main repo runs-on: docker + container: ubuntu:latest steps: - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From 005bf5da9a91d704d554377574440949fa93aa3b Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 09:11:10 -0600 Subject: [PATCH 07/15] Try alpine instead --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 9eb9569..7c86d47 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -8,7 +8,7 @@ jobs: build-and-deploy: if: github.repository != 'profectus-engine/Profectus' # Don't build placeholder mod on main repo runs-on: docker - container: ubuntu:latest + container: alpine:3.18 steps: - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From aabb0a1bbabd07321916940e6bfd03907eb10359 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 09:13:56 -0600 Subject: [PATCH 08/15] Setup node --- .forgejo/workflows/deploy.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 7c86d47..ce8ab1b 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -10,6 +10,11 @@ jobs: runs-on: docker container: alpine:3.18 steps: + - name: Setup NodeJS + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Checkout 🛎️ uses: actions/checkout@v2 with: -- 2.45.2 From 52b500c9d84481efabac5fa98a37ebdd8021e3a7 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 09:49:02 -0600 Subject: [PATCH 09/15] setup rsync --- .forgejo/workflows/deploy.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index ce8ab1b..335e2c3 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -8,12 +8,10 @@ jobs: build-and-deploy: if: github.repository != 'profectus-engine/Profectus' # Don't build placeholder mod on main repo runs-on: docker - container: alpine:3.18 steps: - - name: Setup NodeJS - uses: actions/setup-node@v3 - with: - node-version: 18 + - name: Setup RSync + uses: GuillaumeFalourd/setup-rsync@v1.1 + run: rsync --version - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From c1d0b7eec6fbfe33c0e8c7a2cf0d6621635bb357 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 09:55:52 -0600 Subject: [PATCH 10/15] Fully qualify >.< --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 335e2c3..5923533 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -10,7 +10,7 @@ jobs: runs-on: docker steps: - name: Setup RSync - uses: GuillaumeFalourd/setup-rsync@v1.1 + uses: https://github.com/GuillaumeFalourd/setup-rsync@v1.1 run: rsync --version - name: Checkout 🛎️ -- 2.45.2 From 766c600a70619d5a0e66c2e94f311dbded83ef75 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 09:57:05 -0600 Subject: [PATCH 11/15] Were the rsync logs wrong --- .forgejo/workflows/deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 5923533..1e0dc2b 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -11,7 +11,6 @@ jobs: steps: - name: Setup RSync uses: https://github.com/GuillaumeFalourd/setup-rsync@v1.1 - run: rsync --version - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From 953cd8047e118562bc0423ca455d80280cffe2e7 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 10:06:26 -0600 Subject: [PATCH 12/15] Install rsync the normal way --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 1e0dc2b..3cac5ed 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -10,7 +10,7 @@ jobs: runs-on: docker steps: - name: Setup RSync - uses: https://github.com/GuillaumeFalourd/setup-rsync@v1.1 + run: apt get install rsync - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From 2c615ea5241c64b94a7f8410e050c7d79a22aff4 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 10:07:06 -0600 Subject: [PATCH 13/15] Typo --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 3cac5ed..6a16ddd 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -10,7 +10,7 @@ jobs: runs-on: docker steps: - name: Setup RSync - run: apt get install rsync + run: apt-get install rsync - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From e9283b5cca1ce3ed95e5748df1811d0189462e6d Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 10:16:38 -0600 Subject: [PATCH 14/15] Update repos first --- .forgejo/workflows/deploy.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 6a16ddd..233777d 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -10,7 +10,9 @@ jobs: runs-on: docker steps: - name: Setup RSync - run: apt-get install rsync + run: | + apt-get update + apt-get install rsync - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2 From 8065f8efa4900bfb7b2beb0acebff0d1cc5deee0 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 5 Nov 2023 10:17:23 -0600 Subject: [PATCH 15/15] Approve install --- .forgejo/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 233777d..bc7210a 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -12,7 +12,7 @@ jobs: - name: Setup RSync run: | apt-get update - apt-get install rsync + apt-get install -y rsync - name: Checkout 🛎️ uses: actions/checkout@v2 -- 2.45.2