From 92f0d88788eabee0128bedaf2a07bbd02be6ab88 Mon Sep 17 00:00:00 2001 From: linusha Date: Wed, 2 Aug 2023 14:55:35 +0200 Subject: [PATCH] BETA: add experimental actions for building/deploying --- .github/workflows/build-upload-action.yml | 33 +++++++++++++ .github/workflows/deploy-pages-action.yml | 57 +++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 .github/workflows/build-upload-action.yml create mode 100644 .github/workflows/deploy-pages-action.yml diff --git a/.github/workflows/build-upload-action.yml b/.github/workflows/build-upload-action.yml new file mode 100644 index 0000000..87c4e95 --- /dev/null +++ b/.github/workflows/build-upload-action.yml @@ -0,0 +1,33 @@ +name: Build Project + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout lively.next + uses: actions/checkout@v3 + with: + repository: LivelyKernel/lively.next + ref: 3596b124e6edc271afc4baf4666b759442e25016 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: '18.12.1' + - name: Install lively.next + run: | + chmod a+x ./install.sh + ./install.sh + - name: Checkout Project Repository + uses: actions/checkout@v3 + with: + path: local_projects/LivelyKernel--froscon-2023 + - name: Build Project + run: npm run build --prefix local_projects/LivelyKernel--froscon-2023 + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: build + path: local_projects/LivelyKernel--froscon-2023/build \ No newline at end of file diff --git a/.github/workflows/deploy-pages-action.yml b/.github/workflows/deploy-pages-action.yml new file mode 100644 index 0000000..b2ded98 --- /dev/null +++ b/.github/workflows/deploy-pages-action.yml @@ -0,0 +1,57 @@ +name: Deploy static content to Pages + +on: + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "build-and-deploy" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout lively.next + uses: actions/checkout@v3 + with: + repository: LivelyKernel/lively.next + fetch-depth: '' + ref: 0daa01efc2bfbb8dfbdc4e708e95944daed85759 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: '18.12.1' + - name: Install lively.next + run: | + chmod a+x ./install.sh + ./install.sh + - name: Checkout Project Repository + uses: actions/checkout@v3 + with: + path: local_projects/LivelyKernel--froscon-2023 + - name: Build Project + run: npm run build-minified --prefix local_projects/LivelyKernel--froscon-2023 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: local_projects/LivelyKernel--froscon-2023/build + deploy: + needs: [build] + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file