Skip to content

Commit

Permalink
displicandum-gh-pages-gh-actions (#8): testing GitHub actions instead…
Browse files Browse the repository at this point in the history
… of Travis
  • Loading branch information
fititnt committed May 11, 2021
1 parent 162e8c3 commit 85508fc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/05-deploy-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# FILE: .github/workflows/05-deploy-github-pages.yml
#
# @see https://gist.github.com/domenic/ec8b0fc8ab45f39403dd
# @see https://github.com/marketplace/actions/github-pages-action

name: Build

on:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Build
run: bash systema/infrastructuram/travis-ci.sh

# run: make ci
- 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
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
7 changes: 6 additions & 1 deletion systema/infrastructuram/temporarium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
### Create on local computer ---------------------------------------------------
# @see https://docs.github.com/en/developers/overview/managing-deploy-keys
# @see https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
# @see https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-create-ssh-deploy-key

ssh-keygen -t ed25519 -C "[email protected]" -f "$HOME/.ssh/eticaai/id_ed25519-hapi"

### Add on the deploy repository -----------------------------------------------
### Add on the deploy repository, [HXL-CPLP/hapi.etica.ai] ---------------------
# On our case is here
# - https://github.com/HXL-CPLP/hapi.etica.ai/settings/keys
# If someone is create on a different project, change this
Expand All @@ -38,6 +39,10 @@ ssh-keygen -t ed25519 -C "[email protected]" -f "$H
# ├── id_ed25519-hapi
# └── id_ed25519-hapi.pub


#### Add ACTIONS_DEPLOY_KEY on [HXL-CPLP/Auxilium-Humanitarium-API] ____________
# @see https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-create-ssh-deploy-key

#### Change git push to use custom SSH key _____________________________________
### ALTERNATIVE ONE ------------------------------------------------------------
# @see https://stackoverflow.com/questions/7927750/specify-an-ssh-key-for-git-push-for-a-given-domain/7927828#7927828
Expand Down
4 changes: 4 additions & 0 deletions systema/infrastructuram/travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@
# testing tools or plugins that may expose secrets while operating
echo "HAPI_DEPLOY_KEY_TEST: [$HAPI_DEPLOY_KEY_TEST]"

TEST2="test1${HAPI_DEPLOY_KEY_TEST}test2"

echo "TEST2: [$TEST2]"

echo "hello from /systema/infrastructuram/travis-ci.sh"
exit 0

0 comments on commit 85508fc

Please sign in to comment.