Skip to content

Commit

Permalink
actions testing
Browse files Browse the repository at this point in the history
  • Loading branch information
GingertronMk1 committed Jan 22, 2024
1 parent d6857e0 commit 34708f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 34 deletions.
37 changes: 3 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions _docker/app.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ WORKDIR /app

COPY . .

RUN bundle config path vendor/bundle

RUN gem install bundler -v 2.3.27 \
&& bundle install

Expand Down

0 comments on commit 34708f7

Please sign in to comment.