Skip to content

updated readme and device name #17

updated readme and device name

updated readme and device name #17

name: Copy README to gh-pages
on:
push:
paths:
- 'README.md'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: copy
env:
FILE_PATH: 'README.md'
CPY_PATH: 'index.md'
TARGET_BRANCH: 'gh-pages'
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git fetch # fetch branches
git checkout $TARGET_BRANCH # checkout to target branch
git checkout ${GITHUB_REF##*/} -- $FILE_PATH # copy files from the source branch
mv $FILE_PATH $CPY_PATH
git add -A
git diff-index --quiet HEAD || git commit -am "deploy README.md to index.md" # commit to the repository (ignore if no modification)
git push origin $TARGET_BRANCH