diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa42e907b4f..0400274bc6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,46 +14,24 @@ jobs: uses: actions/checkout@v2 with: persist-credentials: false # needed for JamesIves/github-pages-deploy-action - - - name: Install Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.4 - name: Cache Ruby gems id: cache-gems uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-gems-1-${{ hashFiles('Gemfile.lock') }} - - name: Set Ruby gems directory - run: bundle config path vendor/bundle - - name: Install Ruby gems - # if: steps.cache-gems.outputs.cache-hit != 'true' - run: bundle install --jobs 4 --retry 3 --deployment - - - name: Install Node - uses: actions/setup-node@v2 - with: - node-version: '10' # gulp will likely be upset with newer - name: Cache node_modules id: cache-node uses: actions/cache@v2 with: path: node_modules key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} - - name: Install NPM packages - if: steps.cache-node.outputs.cache-hit != 'true' - run: npm install - - name: Cache Bower libraries id: cache-bower uses: actions/cache@v2 with: path: lib key: ${{ runner.os }}-bower-${{ hashFiles('bower.json') }} - - name: Install Bower packages - if: steps.cache-bower.outputs.cache-hit != 'true' - run: node_modules/.bin/bower install - name: Cache SmugMug id: cache-smugmug @@ -67,27 +45,18 @@ jobs: mkdir -p tmp wget https://nthp.s3-eu-west-1.amazonaws.com/sm-cache.tar.xz -O tmp/sm-cache.tar.xz tar xvf tmp/sm-cache.tar.xz + - name: Build + run: ./_bin/install - name: Store build number run: echo -n $(($GITHUB_RUN_NUMBER + 10000)) > _includes/travis_build_number.txt - name: Build the site - run: node_modules/.bin/gulp build_deploy + run: docker-compose exec app npm run gulp:deploy env: SMUGMUG_API_KEY: ${{ secrets.SMUGMUG_API_KEY }} SMUGMUG_CACHE_MAINTAIN: true - - name: Cache htmltest files - uses: actions/cache@v2 - with: - path: tmp/htmltest - key: htmltest-1 - - name: Test built site with htmltest - uses: wjdp/htmltest-action@master - continue-on-error: true - with: - skip_external: true - - name: Publish to GH Pages 🚀 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} uses: JamesIves/github-pages-deploy-action@3.7.1 diff --git a/_docker/app.dockerfile b/_docker/app.dockerfile index 88fa9076d3c..70df0d202b4 100644 --- a/_docker/app.dockerfile +++ b/_docker/app.dockerfile @@ -7,6 +7,8 @@ WORKDIR /app COPY . . +RUN bundle config path vendor/bundle + RUN gem install bundler -v 2.3.27 \ && bundle install