From 32cef6ef0c0dfa6dce1da08297e72d143a55ed05 Mon Sep 17 00:00:00 2001 From: Edd Date: Mon, 11 Apr 2022 12:42:22 +0100 Subject: [PATCH] Genericise tool name, add workflow --- .github/workflows/ipfs.yml | 33 +++++++++++++++++++++++ tools/{fleek-deploy.js => ipfs-deploy.js} | 2 -- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ipfs.yml rename tools/{fleek-deploy.js => ipfs-deploy.js} (99%) diff --git a/.github/workflows/ipfs.yml b/.github/workflows/ipfs.yml new file mode 100644 index 000000000..a7d557256 --- /dev/null +++ b/.github/workflows/ipfs.yml @@ -0,0 +1,33 @@ +--- +name: Deploy affected projects to IPFS + +'on': + # Triggers the workflow on push to main branch + push: + branches: [master] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: null + +jobs: + master: + name: Publish NX Affected + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + - name: Derive appropriate SHAs for base and head for `nx affected` commands + uses: nrwl/nx-set-shas@v2 + with: + main-branch-name: master + - name: Use Node.js 16 + id: Node + uses: actions/setup-node@v2 + with: + node-version: 16.14.0 + - name: Run deploy for affected sites + run: yarn nx print-affected --select=projects | ./tools/ipfs-deploy.js diff --git a/tools/fleek-deploy.js b/tools/ipfs-deploy.js similarity index 99% rename from tools/fleek-deploy.js rename to tools/ipfs-deploy.js index 3817f23c4..83a8e606f 100755 --- a/tools/fleek-deploy.js +++ b/tools/ipfs-deploy.js @@ -3,8 +3,6 @@ /** * Runs the fleek deploy process based on nx:affected, but only for sites * that have a .fleek.json file - * - * @author Edd */ // Fleek CLI requires this variable to be set