Merge pull request #3 from LightSrc/master #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Generate dummies | |
run: | | |
mkdir "./deploy/" | |
for filePath in $(find "." -name images -type d) | |
do | |
find "$filePath" -type "f" -exec bash -c ' | |
DEPLOY_PATH=$(dirname "./deploy/$1"); | |
DEPLOY_NAME=$(basename "$1") | |
if [ ! -d $DEPLOY_PATH ]; then | |
mkdir -p "$DEPLOY_PATH" | |
fi | |
touch "$DEPLOY_PATH/$DEPLOY_NAME" | |
echo "$DEPLOY_PATH/$DEPLOY_NAME" | |
' _ {} \; | |
done | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: deploy | |
publish_dir: ./deploy | |
enable_jekyll: true | |
full_commit_message: Deploying to gh-pages from @ ${{ github.sha }} 🚀 | |
force_orphan: true |