-
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.
ci: add github action workflow configuration file
- Loading branch information
Showing
1 changed file
with
23 additions
and
5 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,9 +1,27 @@ | ||
name: Post my words to my own blog site | ||
on: [push] | ||
name: Deploy to Site | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
post-my-words: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- name: Trigger my blog site to import from my-words | ||
- name: Trigger Deploy to Site | ||
run: | | ||
curl --location --request POST 'zou8944.com/import' | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/zou8944/my-blog-hexo/dispatches \ | ||
-d "{\"event_type\": \"trigger-workflow\", \"client_payload\": {\"unit\": false, \"integration\": true}}" |