Skip to content

Update create-index.yml #5

Update create-index.yml

Update create-index.yml #5

Workflow file for this run

name: Create Index HTML
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create index.html
run: |
find . -type d -exec sh -c 'echo "<html><head><meta http-equiv=\"refresh\" content=\"0; url=README.zh.md\"></head><body></body></html>" > {}/index.html' \;
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add index.html for redirection to README.zh.md"
git push https://${{ secrets.ACTIONS_TOKEN }}@github.com/${{ github.repository }} HEAD:main