From 82d8d3633267a44a3aeb6b926e99c88cbeb7a63c Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 12:08:56 +0000 Subject: [PATCH 1/6] feat: add packaging for gh pages --- .github/workflows/core.yml | 15 +++++++++++++++ .gitignore | 3 ++- makefile | 3 +++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 56c98da..e550b64 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -22,3 +22,18 @@ jobs: - uses: actions/checkout@v4 - name: release application run: make release + + package: + runs-on: ubuntu-latest + name: Package (Make) + steps: + - uses: actions/checkout@v4 + - name: release application + run: make package + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + name: 'github-pages' + path: 'github-pages.tar.gz' + if-no-files-found: error + compression-level: 0 # Already compressed \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8817f26..cfa1c58 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ # SPDX-License-Identifier: MIT node_modules -dist \ No newline at end of file +dist +github-pages.tar.gz \ No newline at end of file diff --git a/makefile b/makefile index 0d4ec76..de175c8 100644 --- a/makefile +++ b/makefile @@ -12,6 +12,9 @@ build: mkdir -p dist cp -r ./static/** dist +package: release + cd dist && tar -czvf ../github-pages.tar.gz . + live: build npx webpack serve --mode=development From be44e94c5aec291f93ffa803633f3cfb8bd6b18e Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 12:10:03 +0000 Subject: [PATCH 2/6] fix: action name --- .github/workflows/core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index e550b64..aa42b71 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -31,7 +31,7 @@ jobs: - name: release application run: make package - name: Upload artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-artifact@v4 with: name: 'github-pages' path: 'github-pages.tar.gz' From e118a0ac882dfbd861e20c60246d4331ca77ff9a Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 12:11:22 +0000 Subject: [PATCH 3/6] fix: artificate name --- .github/workflows/core.yml | 4 ++-- .gitignore | 3 ++- makefile | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index aa42b71..df0ee2c 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -33,7 +33,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: 'github-pages' - path: 'github-pages.tar.gz' + name: 'artifact' + path: 'artifact.tar.gz' if-no-files-found: error compression-level: 0 # Already compressed \ No newline at end of file diff --git a/.gitignore b/.gitignore index cfa1c58..bff19c3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ node_modules dist -github-pages.tar.gz \ No newline at end of file +github-pages.tar.gz +artifact.tar.gz \ No newline at end of file diff --git a/makefile b/makefile index de175c8..bb51ca5 100644 --- a/makefile +++ b/makefile @@ -13,7 +13,7 @@ build: cp -r ./static/** dist package: release - cd dist && tar -czvf ../github-pages.tar.gz . + cd dist && tar -czvf ../artifact.tar.gz . live: build npx webpack serve --mode=development From 40cbcb7660872a1ebe9dd97aebd68176e411cda6 Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 12:14:11 +0000 Subject: [PATCH 4/6] fix: packaging workflow --- .github/workflows/core.yml | 13 ++----------- makefile | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index df0ee2c..c6737d3 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -15,14 +15,6 @@ jobs: - name: REUSE Compliance Check uses: fsfe/reuse-action@v2 - release: - runs-on: ubuntu-latest - name: Release (Make) - steps: - - uses: actions/checkout@v4 - - name: release application - run: make release - package: runs-on: ubuntu-latest name: Package (Make) @@ -34,6 +26,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: 'artifact' - path: 'artifact.tar.gz' - if-no-files-found: error - compression-level: 0 # Already compressed \ No newline at end of file + path: 'artifact.tar' + if-no-files-found: error \ No newline at end of file diff --git a/makefile b/makefile index bb51ca5..b47f925 100644 --- a/makefile +++ b/makefile @@ -13,7 +13,7 @@ build: cp -r ./static/** dist package: release - cd dist && tar -czvf ../artifact.tar.gz . + cd dist && tar -vf ../artifact.tar . live: build npx webpack serve --mode=development From 7b9b8db390fea7af811b3d68e817d67a352657dc Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 12:14:33 +0000 Subject: [PATCH 5/6] fix: packaging --- .github/workflows/core.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index c6737d3..df0ee2c 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -15,6 +15,14 @@ jobs: - name: REUSE Compliance Check uses: fsfe/reuse-action@v2 + release: + runs-on: ubuntu-latest + name: Release (Make) + steps: + - uses: actions/checkout@v4 + - name: release application + run: make release + package: runs-on: ubuntu-latest name: Package (Make) @@ -26,5 +34,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: 'artifact' - path: 'artifact.tar' - if-no-files-found: error \ No newline at end of file + path: 'artifact.tar.gz' + if-no-files-found: error + compression-level: 0 # Already compressed \ No newline at end of file From 9e66eed17ded9f1a9d90a82ead756737a8b38323 Mon Sep 17 00:00:00 2001 From: Kaelan Thijs Fouwels Date: Fri, 29 Dec 2023 12:18:33 +0000 Subject: [PATCH 6/6] feat: add deployment --- .github/workflows/core.yml | 17 +---------------- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index df0ee2c..cc755ee 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -21,19 +21,4 @@ jobs: steps: - uses: actions/checkout@v4 - name: release application - run: make release - - package: - runs-on: ubuntu-latest - name: Package (Make) - steps: - - uses: actions/checkout@v4 - - name: release application - run: make package - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: 'artifact' - path: 'artifact.tar.gz' - if-no-files-found: error - compression-level: 0 # Already compressed \ No newline at end of file + run: make release \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f8d2d5c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2020 Kaelan Thijs Fouwels +# +# SPDX-License-Identifier: MIT +on: + push: + branches: + - mainline +name: Core +jobs: + package: + runs-on: ubuntu-latest + name: Package (Make) + steps: + - uses: actions/checkout@v4 + - name: release application + run: make package + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: 'artifact' + path: 'artifact.tar' + if-no-files-found: error + + deploy: + needs: package + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4