From dbfe965dec1c37a06253fcde675dcb0a61b163ef Mon Sep 17 00:00:00 2001 From: sellnat77 Date: Sun, 1 Mar 2020 18:34:35 -0800 Subject: [PATCH] Attempting at fixing deploy step for prod --- .github/workflows/Continuous_Delivery.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Continuous_Delivery.yml b/.github/workflows/Continuous_Delivery.yml index 6382882d2..30439c951 100644 --- a/.github/workflows/Continuous_Delivery.yml +++ b/.github/workflows/Continuous_Delivery.yml @@ -16,21 +16,27 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Rebuild sass + run: npm rebuild node-sass - name: Install Packages run: npm install - name: Build project run: npm run build + env: + REACT_APP_MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} + DB_URL: ${{ secrets.DB_URL }} - name: Run Tests run: export CI=true && npm run test -- --coverage env: - MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} + REACT_APP_MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} DB_URL: ${{ secrets.DB_URL }} # DISABLING DEPLOYMENT TO PRESERVE "PRODUCTION" - name: Deploy to GH pages uses: JamesIves/github-pages-deploy-action@master env: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + REACT_APP_MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} + DB_URL: ${{ secrets.DB_URL }} BASE_BRANCH: master # The branch the action should deploy from. BRANCH: gh-pages # The branch the action should deploy to. FOLDER: dist # The folder the action should deploy. - BUILD_SCRIPT: echo REACT_APP_MAPBOX_TOKEN=${{secrets.MAPBOX_TOKEN}} && echo DB_URL=${{secrets.DB_URL}} >> .env && npm rebuild node-sass && npm install && npm run-script build # The build script the action should run prior to deploying.