-
Notifications
You must be signed in to change notification settings - Fork 23
40 lines (34 loc) · 1.16 KB
/
init-repository.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Init repository
on:
push:
branches:
- master
jobs:
init-repository:
name: Setup store and init repository
runs-on: ubuntu-latest
if: github.repository != 'ecomplus/storefront-starter'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Remove LICENSE and edit default README
run: |
git config --local user.email 'action@github.com'
git config --local user.name 'GitHub Action'
rm -f ./LICENSE
if [ -f ./.README.md ]; then
mv ./.README.md ./README.md
fi
rm ./.github/workflows/init-repository.yml
git commit -am "chore(init): remove default license and update readme [skip ci]"
- name: Add views subtree
run: |
rm -rf ./template/pages
git commit -am "chore: remove template/pages to setup subtree"
git subtree add --prefix=template/pages \
https://github.com/ecomplus/storefront-starter-views.git master --squash
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master