Skip to content

Commit aea4e8e

Browse files
Update main.yml
run deploy only on master
1 parent 58be1ca commit aea4e8e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ jobs:
1515
with:
1616
node-version: 10.x
1717

18-
- name: Prepare and deploy
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
- name: Prepare
2119
run: |
2220
cd src
2321
npm install --silent
@@ -31,4 +29,11 @@ jobs:
3129
cd your-angular-project
3230
npm link angular-cli-ghpages
3331
ng add angular-cli-ghpages
32+
33+
- name: Deploy
34+
if: github.ref == 'refs/heads/master'
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
cd src
3439
ng deploy --no-silent --name="The Buildbot" --email="[email protected]"

0 commit comments

Comments
 (0)