Skip to content

Commit

Permalink
ci: add github action workflow configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
zou8944 committed Jun 22, 2024
1 parent 0730213 commit 109212d
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/deploy.yml
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}}"

0 comments on commit 109212d

Please sign in to comment.