diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9acb9bc5..7c640a3c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: ':🚀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: ':🚀page build/deploy by github action.' auto_commit: runs-on: ubuntu-latest