-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6857e0
commit 34708f7
Showing
2 changed files
with
5 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters