From e5b3eeebd93dace8101e749c98c861a5c0da8862 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 17 Mar 2022 04:12:15 +0000 Subject: [PATCH] Reduce dependence on third-party build scripts in release pipeline This removes one third-party build script from the release pipeline for the release tar.gz, though one is still used in the now-separate netlify deploy. --- .github/workflows/prod-deploy.yml | 35 ++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index 107abbc4..c8b2df03 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -5,21 +5,16 @@ on: types: [published] jobs: - deploy-to-netlify: - name: 'Deploy to Netlify' + create-release: + name: 'Create release tar' runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Check out the repo uses: actions/checkout@v3.0.2 - - name: Build and deploy to Netlify - uses: jsmrcaga/action-netlify-deploy@fb6a5f936a4b06a8f7793e69fc5a022ffe39807a - with: - install_command: "npm ci" - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - BUILD_DIRECTORY: "dist" - NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}" - NETLIFY_DEPLOY_TO_PROD: true + - name: Build + run: | + npm ci + npm run build - name: Get version from tag id: vars run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} @@ -39,6 +34,22 @@ jobs: cinny-${{ steps.vars.outputs.tag }}.tar.gz cinny-${{ steps.vars.outputs.tag }}.tar.gz.asc + deploy-to-netlify: + name: 'Deploy to Netlify' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3.0.2 + - name: Build and deploy to Netlify + uses: jsmrcaga/action-netlify-deploy@fb6a5f936a4b06a8f7793e69fc5a022ffe39807a + with: + install_command: "npm ci" + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + BUILD_DIRECTORY: "dist" + NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}" + NETLIFY_DEPLOY_TO_PROD: true + push_to_dockerhub: name: Push Docker image to Docker Hub runs-on: ubuntu-latest