Skip to content

Commit

Permalink
edited deploy.yml/harmony.yml CACHE_ID=2
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions <github-actions@github.com>
  • Loading branch information
github-actions committed Jan 31, 2025
1 parent 20397be commit 63a5c36
Showing 1 changed file with 40 additions and 42 deletions.
82 changes: 40 additions & 42 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,47 @@ jobs:
env:
LSI: 'true'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: cache Ruby Bundler
id: cache
uses: actions/cache@v2
env:
CACHE_ID: 1
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler-${{ env.CACHE_ID }}-${{ hashFiles('Gemfile') }}
restore-keys: |
${{ runner.os }}-bundler-${{ env.CACHE_ID }}-
- name: Change rubygems loading
run: |
sed -i "/^source/c source 'https://rubygems.org'" Gemfile
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
# bundle clean --force
bundle install --path=vendor/bundle --jobs=4 --retry=3
gem update --system 3.2.3
- name: setup commit hash string
run: |
commitString=$(git rev-list HEAD --abbrev-commit --max-count=1)
echo "commitString: $commitString" >> _config.yml
- name: run jekyll-build
run: |
bundle config set --local path 'vendor/bundle'
bundle exec jekyll build --trace
- name: simple deploy with git
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
BASE_BRANCH: 'main'
BRANCH: 'gh-pages'
FOLDER: '_site'
commit-message: '<auto generate>:🚀page build/deploy by github action.'
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: cache Ruby Bundler
id: cache
uses: actions/cache@v2
env:
CACHE_ID: 2
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler-${{ env.CACHE_ID }}-${{ hashFiles('Gemfile') }}
restore-keys: |
${{ runner.os }}-bundler-${{ env.CACHE_ID }}-
- name: Change rubygems loading
run: sed -i "/^source/c source 'https://rubygems.org'" Gemfile
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
bundle install --path=vendor/bundle --jobs=4 --retry=3
gem update --system 3.2.3
- name: setup commit hash string
run: |
commitString=$(git rev-list HEAD --abbrev-commit --max-count=1)
echo "commitString: $commitString" >> _config.yml
- name: run jekyll-build
run: |
bundle config set --local path 'vendor/bundle'
bundle exec jekyll build --trace
- name: simple deploy with git
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
BASE_BRANCH: 'main'
BRANCH: 'gh-pages'
FOLDER: '_site'
commit-message: '<auto generate>:🚀page build/deploy by github action.'

auto_commit:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 63a5c36

Please sign in to comment.