chore: update README file #7
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 to dist branch | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Switch to dist branch | |
run: | | |
git fetch | |
git switch dist || git checkout -b dist | |
- name: Move content from src to root | |
run: | | |
mv ./src/* ./ | |
rm -rf ./src | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m "Move content from src to root" | |
git push origin dist | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |