From 67f9b2b4d49868f61b73383303b817798f078334 Mon Sep 17 00:00:00 2001 From: linusha Date: Mon, 18 Sep 2023 12:41:05 +0200 Subject: [PATCH] Commited from within lively.next. --- .github/workflows/ci-tests.yml | 3 ++ ...oad-action.yml => deploy-pages-action.yml} | 35 +++++++++++++------ package.json | 7 ++-- 3 files changed, 32 insertions(+), 13 deletions(-) rename .github/workflows/{build-upload-action.yml => deploy-pages-action.yml} (68%) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 4d5b4b2..2aae3ae 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -1,6 +1,9 @@ name: Run Tests on: + push: + branches: + - main workflow_dispatch: concurrency: diff --git a/.github/workflows/build-upload-action.yml b/.github/workflows/deploy-pages-action.yml similarity index 68% rename from .github/workflows/build-upload-action.yml rename to .github/workflows/deploy-pages-action.yml index f95894c..71ad892 100644 --- a/.github/workflows/build-upload-action.yml +++ b/.github/workflows/deploy-pages-action.yml @@ -1,11 +1,15 @@ -name: Build Project +name: Deploy Project to GitHub Pages on: workflow_dispatch: +permissions: + pages: write + id-token: write + concurrency: - group: "build-and-upload" - cancel-in-progress: true + group: "build-and-deploy" + cancel-in-progress: false jobs: build: @@ -15,7 +19,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18.12.1' - - name: Restore `lively.next` installation + - name: Restore `lively.next` repo id: cache-lively uses: actions/cache/restore@v3 env: @@ -31,11 +35,11 @@ jobs: repository: LivelyKernel/lively.next ref: 54d89c79a1893e764c13aa184391c37ded381cae - name: Install `lively.next` - if: ${{ steps.cache-lively.outputs.cache-hit != 'true' }} + if: ${{ steps.cache-lively.outputs.cache-hit != 'true' }} run: | chmod a+x ./install.sh ./install.sh --freezer-only - - name: Save `lively` installation in cache + - name: Save `lively` repo in cache if: ${{ steps.cache-lively.outputs.cache-hit != 'true' }} uses: actions/cache/save@v3 env: @@ -50,8 +54,19 @@ jobs: path: local_projects/LivelyKernel--froscon-2023 - name: Build Project run: npm run build-minified --prefix local_projects/LivelyKernel--froscon-2023 - - name: Upload Build Artifacts - uses: actions/upload-artifact@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: local_projects/LivelyKernel--froscon-2023/build + deploy: + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v2 + - name: Delete uploaded Artifact + uses: geekyeggo/delete-artifact@v2 with: - name: build - path: local_projects/LivelyKernel--froscon-2023/build \ No newline at end of file + name: github-pages \ No newline at end of file diff --git a/package.json b/package.json index 98c563a..342c5b2 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,10 @@ "boundLivelyVersion": "54d89c79a1893e764c13aa184391c37ded381cae", "canUsePages": true, "testActionEnabled": true, - "buildActionEnabled": true, - "testOnPush": false, + "buildActionEnabled": false, + "deployActionEnabled": true, + "testOnPush": true, "buildOnPush": false }, - "version": "0.2.1" + "version": "0.2.2" } \ No newline at end of file