Skip to content

Commit

Permalink
displicandum-gh-pages (#8): jeffreytse/jekyll-deploy-action testum
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed May 15, 2021
1 parent 87e7fe4 commit ee8019f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 27 deletions.
67 changes: 43 additions & 24 deletions .github/workflows/05-deploy-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,50 @@ jobs:
- name: "Steps before Jekyll: rm .gitignore"
run: rm .gitignore

# - name: "DEBUG: sudo apt install tree"
# run: sudo apt install tree

# - name: "DEBUG: pwd"
# run: pwd
### GitHub pages, alternative 1 __________________________________________
## If not using customizations beyond GitHub Pages default plugins,
## Use this option
# - name: Deploy to HXL-CPLP/hapi.etica.ai
# uses: peaceiris/actions-gh-pages@v3
# with:
# # github_token: ${{ secrets.GITHUB_TOKEN }}
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# user_name: "github-actions[bot]"
# user_email: "github-actions[bot]@users.noreply.github.com"
# external_repository: HXL-CPLP/hapi.etica.ai
# publish_branch: gh-pages
# publish_dir: "./"
# destination_dir: ./docs
# enable_jekyll: true
# # cname: hapi.etica.ai

# - name: "DEBUG: tree -a"
# run: tree -a
### GitHub pages, alternative 2 __________________________________________
## @see https://github.com/jeffreytse/jekyll-deploy-action
## This allow use extra customizations on Jekyll

- name: Deploy to HXL-CPLP/hapi.etica.ai
uses: peaceiris/actions-gh-pages@v3
# Use GitHub Actions' cache to cache dependencies on servers
# @see https://github.com/jeffreytse/jekyll-deploy-action/issues/14#issuecomment-808108993
# @see https://github.com/nektos/act/issues/285
# Error "Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache."
# - uses: actions/cache@v2
# with:
# path: vendor/bundle
# # key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
# key: ${{ runner.os }}-gems-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/Gemfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-gems-

# Use GitHub Deploy Action to build and deploy to Github
- uses: jeffreytse/[email protected]
with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
external_repository: HXL-CPLP/hapi.etica.ai
publish_branch: gh-pages
publish_dir: "./"
destination_dir: ./docs
enable_jekyll: true
# cname: hapi.etica.ai
# - name: Deploy
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./out
provider: 'github'
token: ${{ secrets.GH_TOKEN }} # It's your Personal Access Token(PAT)
repository: 'HXL-CPLP/hapi.etica.ai' # Default is current repository
branch: 'gh-pages' # Default is gh-pages for github provider
jekyll_src: './' # Default is root directory
jekyll_cfg: '_config.yml' # Default is _config.yml
# jekyll_baseurl: '' # Default is according to _config.yml
bundler_ver: '>=0' # Default is latest bundler version
cname: 'hapi.etica.ai' # Default is to not use a cname
actor: 'eticaaibot' # Default is the GITHUB_ACTOR
6 changes: 5 additions & 1 deletion _systema/infrastructuram/github-actions-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ act

# act --secret secrets.ACTIONS_DEPLOY_KEY="..."
# # sudo act --secret secrets.ACTIONS_DEPLOY_KEY="..."
act --secret secrets-file="$HOME/.ssh/eticaai/.hapi.env"
# act --secret secrets-file="$HOME/.ssh/eticaai/.hapi.env"
# sudo act --secret secrets-file="$HOME/.ssh/eticaai/.hapi.env"

# Note: the first run, even with secrets files, did not published to GitHub.
# but all steps before worked.

### Use one of these
act --secret secrets-file="$HOME/.ssh/eticaai/.hapi.env"
act --secret GH_TOKEN="EticaAIbotGHPersonalTokenHere"
4 changes: 2 additions & 2 deletions _systema/programma/openapi-exportandum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ OPENAPI_RADICEM=(

# Trivia: 'exportandum', https://en.wiktionary.org/wiki/exporto#Latin
OPENAPI_EXPORTANDUM=(
'html'
'html2'
# 'html'
# 'html2'
'mysql-schema'
'graphql-schema'
)
Expand Down

0 comments on commit ee8019f

Please sign in to comment.