-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
75 additions
and
63 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,48 @@ | ||
name: Trigger Web Deploy | ||
|
||
on: | ||
push: | ||
push: | ||
branches: | ||
- master | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
name: Production Deployment | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
trigger-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ๐ Get latest code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title || '' }} | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message || '' }} | ||
FINAL_TITLE: ${{ github.event.pull_request.title || github.event.head_commit.message }} | ||
|
||
- name: ๐งฉ Install Modules | ||
run: yarn | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: ๐ทโโ๏ธ Build Project | ||
run: yarn build | ||
env: | ||
CI: false | ||
- name: Clean Commit Message | ||
id: clean-message | ||
run: | | ||
CLEAN_TITLE=$(echo "${{ env.FINAL_TITLE }}" | tr -d '\000-\031') | ||
echo "CLEAN_TITLE=$CLEAN_TITLE" >> $GITHUB_ENV | ||
- name: ๐ Sync files | ||
uses: SamKirkland/[email protected] | ||
- name: Trigger Deploy | ||
uses: peter-evans/repository-dispatch@v2 | ||
with: | ||
server: ${{ secrets.DODAM_FILEZILLA_IP }} | ||
username: ${{ secrets.DODAM_FILEZILLA_USERNAME }} | ||
password: ${{ secrets.DODAM_FILEZILLA_PWD }} | ||
local-dir: ./build/ | ||
port: 2021 | ||
protocol: ftps | ||
token: ${{ secrets.GIT_ACCESS_TOKEN }} | ||
repository: team-b1nd/web-deploy-config | ||
event-type: trigger-deploy | ||
client-payload: | | ||
{ | ||
"repo_name": "${{ github.repository }}", | ||
"branch": "${{ github.ref }}", | ||
"source_directory": "./build", | ||
"project_name": "dodam", | ||
"destination_directory": "/schedule", | ||
"config_secret": "${{ secrets.CONFIG_JSON }}", | ||
"title": "${{ env.CLEAN_TITLE }}", | ||
"package_manager_config_command": "npm config set registry=https://npm.pkg.github.com/Team-B1ND && npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GIT_ACCESS_TOKEN }} && npm config set //registry.npmjs.org/:_authToken=${{ secrets.GIT_ACCESS_TOKEN }}", | ||
"package_manager": "npm" | ||
} |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,5 @@ class Token { | |
return data; | ||
} | ||
} | ||
|
||
export default new Token(); | ||
const token = new Token(); | ||
export default token; |
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
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