Skip to content

Commit 238136c

Browse files
authored
Add auto-deploy job (#16)
* Add auto-deploy job * Fix add commit remove args * Enable push during deploy * Remove "remove" from auto-deploy * No pull * Auto-deploy commit (WF: build-test-deploy) * Ignore changes in dist for workflow Co-authored-by: DeveloperRic <[email protected]>
1 parent 2a002da commit 238136c

File tree

7 files changed

+713
-3
lines changed

7 files changed

+713
-3
lines changed

.github/workflows/test.yml renamed to .github/workflows/main.yml

+38-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
name: 'build-test'
1+
name: 'built-test-deploy'
22
on:
33
pull_request:
4+
paths-ignore:
5+
- 'dist/**'
46
push:
57
branches:
68
- main
79
- 'releases/*'
10+
paths-ignore:
11+
- 'dist/**'
812

913
jobs:
1014
build:
@@ -87,3 +91,36 @@ jobs:
8791
ACTION_CREATE_ENV_TEST: 1
8892
- run: cat .env
8993
- run: grep -zP "^PROD=0\nTEST=1$" .env
94+
deploy:
95+
runs-on: ubuntu-latest
96+
needs:
97+
- test-using-default-dir
98+
- test-using-provided-dir
99+
- test-override-existing
100+
- test-including-env-vars
101+
steps:
102+
- uses: actions/checkout@v2
103+
- uses: actions/download-artifact@v2
104+
with:
105+
name: dist
106+
path: dist
107+
- uses: EndBug/add-and-commit@v7
108+
with:
109+
# The arguments for the `git add` command (see the paragraph below for more info)
110+
# Default: '.'
111+
add: 'dist'
112+
113+
# Determines the way the action fills missing author name and email. Three options are available:
114+
# - github_actor -> UserName <[email protected]>
115+
# - user_info -> Your Display Name <[email protected]>
116+
# - github_actions -> github-actions <email associated with the github logo>
117+
# Default:
118+
default_author: github_actor
119+
120+
# The message for the commit
121+
# Default: 'Commit from GitHub Actions (name of the workflow)'
122+
message: 'Auto-deploy commit (WF: build-test-deploy)'
123+
124+
# The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all.
125+
# Default: '--no-rebase'
126+
pull_strategy: 'NO-PULL'

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,3 @@ Thumbs.db
9797
# Ignore built ts files
9898
__tests__/runner/*
9999
lib/**/*
100-
dist/

.prettierrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"semi": false,
66
"singleQuote": true,
77
"trailingComma": "none",
8-
"bracketSpacing": false,
8+
"bracketSpacing": true,
99
"arrowParens": "avoid"
1010
}

0 commit comments

Comments
 (0)