项目作者: gha-utilities

项目描述 :
Action for running Bundle Install and Jekyll Build within a Docker container
高级语言: Shell
项目地址: git://github.com/gha-utilities/jekyll-build.git
创建时间: 2019-10-15T00:59:30Z
项目社区:https://github.com/gha-utilities/jekyll-build

开源协议:

下载


GHA Jekyll Build

[heading__title]:

jekyll-build

“⬆ Top of ReadMe File”

Action for running Bundle Install and Jekyll Build within a Docker container

[![Byte size of jekyll-build][badgemasterjekyll_buildsource_code]][jekyll_buildmastersource_code] [![Open Issues][badgeissuesjekyll_build]][issuesjekyll_build] [![Open Pull Requests][badgepull_requestsjekyll_build]][pull_requestsjekyll_build] [![Latest commits][badgecommitsjekyll_buildmaster]][commitsjekyll_buildmaster]


Table of Contents

  • [:arrow_up: Top of ReadMe File][heading__title]

  • [:building_construction: Requirements][heading__requirements]

  • [:zap: Quick Start][heading__quick_start]

  • [🗒 Notes][notes]

  • [:card_index: Attribution][heading__attribution]

  • [:balance_scale: License][heading__license]


Requirements

[heading__requirements]:

requirements

“🏗 “

Access to GitHub Actions if using on GitHub, or Docker knowledge if utilizing privately.


Quick Start

[heading__quick_start]:

quick-start

“⚡ Perhaps as easy as one, 2.0,…”

Reference the code of this repository within your own workflow

  1. on:
  2. push:
  3. branches:
  4. - src-pages
  5. jobs:
  6. jekyll_build:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - name: Checkout source branch for building Pages
  10. uses: actions/checkout@v1
  11. with:
  12. ref: src-pages
  13. fetch-depth: 10
  14. # Note the following may not be required in future versions of Jekyll Build Actions
  15. - name: Make build destination directory
  16. run: mkdir -vp ~/www/repository-name
  17. - name: Jekyll Build
  18. uses: gha-utilities/jekyll-build@v0.1.1
  19. with:
  20. jekyll_github_token: ${{ secrets.JEKYLL_GITHUB_TOKEN }}
  21. source: ./
  22. destination: ~/www/repository-name
  23. - name: Checkout branch for GitHub Pages
  24. uses: actions/checkout@v1
  25. with:
  26. ref: pr-pages
  27. fetch-depth: 1
  28. submodules: true
  29. - name: Copy built site files into Git branch
  30. run: cp -r ~/www/repository-name ./
  31. - name: Add and Commit changes to pr-pages branch
  32. run: |
  33. git config --local user.email 'action@github.com'
  34. git config --local user.name 'GitHub Action'
  35. git add -A .
  36. git commit -m 'Updates compiled site files'
  37. - name: Push changes
  38. uses: ad-m/github-push-action@master
  39. with:
  40. github_token: ${{ secrets.GITHUB_TOKEN }}
  41. branch: pr-pages
  42. - name: Initialize Pull Request
  43. uses: gha-utilities/init-pull-request@v0.0.3
  44. with:
  45. pull_request_token: ${{ secrets.GITHUB_TOKEN }}
  46. head: pr-pages
  47. base: gh-pages
  48. title: 'Updates site files from latest Actions build'
  49. body: >
  50. Perhaps a multi-line description
  51. about latest features and such.

Notes

[notes]:

notes

“🗒 Additional notes and links that may be worth clicking in the future”

The new JEKYLL_GITHUB_TOKEN should have public_repo permissions, be assigned within your project’s Secrets Settings, eg. https://github.com/<maintainer>/<repository>/settings/secrets, and generally is only required if utilizing the github-metadata from Jekyll.


To pass compiled site files to another Workflow utilize the Upload and Download Actions from GitHub…

.github/workflows/jekyll_build.yml

  1. on:
  2. push:
  3. branches:
  4. - src-pages
  5. jobs:
  6. jekyll_build:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - name: Checkout source branch for building Pages
  10. uses: actions/checkout@v1
  11. with:
  12. ref: src-pages
  13. fetch-depth: 10
  14. - name: Make build destination directory
  15. run: mkdir -vp ~/www/repository-name
  16. - name: Jekyll Build
  17. uses: gha-utilities/jekyll-build@v0.1.1
  18. with:
  19. source: ./
  20. destination: ~/www/repository-name
  21. - name: Upload Built Pages
  22. uses: actions/upload-artifact@v1.0.0
  23. with:
  24. name: Complied-Jekyll-Pages
  25. path: ~/www/repository-name

.github/workflows/open_pull_request.yml

  1. on:
  2. push:
  3. branches:
  4. - src-pages
  5. jobs:
  6. open_pull_request:
  7. needs: [jekyll_build]
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout branch for GitHub Pages
  11. uses: actions/checkout@v1
  12. with:
  13. ref: gh-pages
  14. fetch-depth: 1
  15. submodules: true
  16. - name: Download Compiled Pages
  17. uses: actions/download-artifact@v1.0.0
  18. with:
  19. name: Complied-Jekyll-Pages
  20. path: ./
  21. - name: Add and Commit changes to pr-pages branch
  22. run: |
  23. git config --local user.email 'action@github.com'
  24. git config --local user.name 'GitHub Action'
  25. git add -A .
  26. git commit -m 'Updates compiled site files'
  27. - name: Push changes
  28. uses: ad-m/github-push-action@master
  29. with:
  30. github_token: ${{ secrets.GITHUB_TOKEN }}
  31. branch: pr-pages
  32. - name: Initialize Pull Request
  33. uses: gha-utilities/init-pull-request@v0.0.3
  34. with:
  35. pull_request_token: ${{ secrets.GITHUB_TOKEN }}
  36. head: pr-pages
  37. base: gh-pages
  38. title: 'Updates site files from latest Actions build'
  39. body: >
  40. Perhaps a multi-line description
  41. about latest features and such.

Attribution

[heading__attribution]:

attribution

“📇 Resources that where helpful in building this project so far.”


License

[heading__license]:

license

“⚖ Legal bits of Open Source software”

Legal bits of Open Source software

  1. Jekyll Build GitHub Actions documentation
  2. Copyright (C) 2023 S0AndS0
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as published
  5. by the Free Software Foundation; version 3 of the License.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU Affero General Public License for more details.
  10. You should have received a copy of the GNU Affero General Public License
  11. along with this program. If not, see <https://www.gnu.org/licenses></https:>.

[badgecommitsjekyll_build__master]:
https://img.shields.io/github/last-commit/gha-utilities/jekyll-build/master.svg

[commitsjekyll_buildmaster]:
https://github.com/gha-utilities/jekyll-build/commits/master
“📝 History of changes on this branch”

[jekyll_build__community]:
https://github.com/gha-utilities/jekyll-build/community
“🌱 Dedicated to functioning code”

[badgeissuesjekyll_build]:
https://img.shields.io/github/issues/gha-utilities/jekyll-build.svg

[issues_jekyll_build]:
https://github.com/gha-utilities/jekyll-build/issues
“☢ Search for and _bump
existing issues or open new issues for project maintainer to address.”

[badgepull_requestsjekyll_build]:
https://img.shields.io/github/issues-pr/gha-utilities/jekyll-build.svg

[pull_requests__jekyll_build]:
https://github.com/gha-utilities/jekyll-build/pulls
“🏗 Pull Request friendly, though please check the Community guidelines”

[badgemasterjekyll_build__source_code]:
https://img.shields.io/github/repo-size/gha-utilities/jekyll-build

[jekyll_buildmastersource_code]:
https://github.com/gha-utilities/jekyll-build
“⌨ Project source code!”