-
Notifications
You must be signed in to change notification settings - Fork 108
62 lines (58 loc) · 1.5 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: create new branch
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@v2
with:
ref: master
- name: npm init
uses: actions/setup-node@v2
with:
node-version: '12.x'
- name: Create new Branch
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
yarn
yarn build
rm -rf .git
git init
git config --global user.email "ci@example.com"
git config --global user.name "CI Action"
if [[ ! -f .gitignore ]]; then
# Make sure .gitignore exists
touch .gitignore
fi
if ! grep -q .gitignore; then
echo "src
.editorconfig
.gitignore
.babelrc
.github/
./images
webpack.config.js
bin
gulpfile.js
.prettierignore
.prettierrc
config.js
node_modules
content
package.json
svgpack
tmp
config.toml
yarn.lock
renovate.json
!/exampleSite/config.toml
!/exampleSite/content
!/exampleSite/static" >> .gitignore
fi
git add .
git commit -m "Deploy from Github Actions"
git push --force --quiet "https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" master:release