From 97ec1af965266481390e3f653ea9904cc0754460 Mon Sep 17 00:00:00 2001 From: Marc Tonsen Date: Fri, 27 Oct 2023 09:54:26 +0200 Subject: [PATCH 01/15] Deploy Neon only --- .../build-deploy-staging-vitepress.yml | 67 +++++++++++++++++++ neon/general/swapping-frames/index.md | 4 +- neon/package-lock.json | 2 +- 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-deploy-staging-vitepress.yml diff --git a/.github/workflows/build-deploy-staging-vitepress.yml b/.github/workflows/build-deploy-staging-vitepress.yml new file mode 100644 index 000000000..569fb1b4e --- /dev/null +++ b/.github/workflows/build-deploy-staging-vitepress.yml @@ -0,0 +1,67 @@ +name: Build/Deploy to Staging (Vitepress) + +on: + workflow_dispatch: # this makes the action manual + +jobs: + build: + name: Install dependencies and generate static site + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Neon dependencies + working-directory: ./neon + run: npm install + - name: Neon build + working-directory: ./neon + run: npm run docs:build + + - name: Neon write commit SHA to gitcommit.txt in dist + shell: bash + run: | + echo $GITHUB_SHA > neon/.vitepress/dist/gitcommit.txt + + - name: Neon get size of files in dist + shell: bash + run: | + du -ah neon/.vitepress/dist + + - name: Archive build artifacts + uses: actions/upload-artifact@v2 + with: + name: neon-vitepress-dist + path: neon/.vitepress/dist + + deploy-staging: + name: Deploy to staging + runs-on: ubuntu-latest + environment: + name: staging + url: https://docs-staging.pupil-labs.com + needs: build + + steps: + - uses: actions/checkout@v3 + + - name: Download generated website dist dir + uses: actions/download-artifact@v2 + with: + name: neon-vitepress-dist + path: neon/.vitepress/dist + + - name: Rsync action - Deploy to staging + uses: burnett01/rsync-deployments@4.1 + with: + switches: -hrvz --delete --exclude=".htaccess" + path: neon/.vitepress/dist/ + remote_path: ${{ secrets.REMOTE_PATH }} + remote_host: ${{ secrets.REMOTE_HOST}} + remote_user: ${{ secrets.REMOTE_USER }} + remote_key: ${{ secrets.DEPLOY_KEY }} diff --git a/neon/general/swapping-frames/index.md b/neon/general/swapping-frames/index.md index 8a0d920d1..40f408e99 100644 --- a/neon/general/swapping-frames/index.md +++ b/neon/general/swapping-frames/index.md @@ -2,6 +2,6 @@ Many [different](TODO) frames are available for the Neon module, which enables the usage of Neon in various different applications. You can easily detach the Neon module from one frame and attach it to another. Check the video below to see how it's done. -