Skip to content

Commit 5fc4283

Browse files
committed
build(cd): migrate CD to GitHub
1 parent 9de95bf commit 5fc4283

File tree

6 files changed

+17
-59
lines changed

6 files changed

+17
-59
lines changed

.github/workflows/cd.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CD
2+
on:
3+
push:
4+
branches: [production, docs]
5+
6+
jobs:
7+
launch:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: |
11+
curl -X POST -H "Accept: application/vnd.github+json" \
12+
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" \
13+
https://api.github.com/repos/${{ secrets.BUILDER }}/dispatches \
14+
-d '{"event_type":"deploy", "client_payload":{"branch": "${{ github.ref_name }}"}}'

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
paths-ignore:
1010
- '.github/**'
1111
- '!.github/workflows/ci.yml'
12-
- '.travis.yml'
1312
- '.gitignore'
1413
- 'README.md'
1514
- 'LICENSE'

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
!.git*
44
!.editorconfig
55
!.nojekyll
6-
!.travis.yml
76
!.husky
87
!.commitlintrc.json
98
!.versionrc.json

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

_posts/2019-08-09-getting-started.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ $ bash tools/init.sh
3939

4040
The above command will:
4141

42-
1. Removes some files or directories from your repository:
43-
- `.travis.yml`{: .filepath}
44-
- files under `_posts`{: .filepath}
42+
1. Remove the files in `_posts`{: .filepath} from your repository.
4543

4644
2. If the option `--no-gh` is provided, the directory `.github`{: .filepath} will be deleted. Otherwise, set up the GitHub Action workflow by removing the extension `.hook`{: .filepath} of `.github/workflows/pages-deploy.yml.hook`{: .filepath}, and then remove the other files and directories in the folder `.github`{: .filepath}.
4745

48-
3. Removes item `Gemfile.lock` from `.gitignore`{: .filepath}.
46+
3. Remove item `Gemfile.lock` from `.gitignore`{: .filepath}.
4947

50-
4. Creates a new commit to save the changes automatically.
48+
4. Create a new commit to save the changes automatically.
5149

5250
### Installing Dependencies
5351

tools/init.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ init_files() {
6666
rm -f ".gitignore.$TEMP_SUFFIX"
6767

6868
# remove the other fies
69-
rm -f .travis.yml
7069
rm -rf _posts/*
7170

7271
# save changes

0 commit comments

Comments
 (0)