Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AIboy996 committed Sep 20, 2024
1 parent 1076530 commit 10426b6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

repository_dispatch:
types: [run-deploy]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ permissions:
on:
schedule:
- cron: '0 0 * * *' # every day
push:
branches:
- main
workflow_dispatch:

jobs:
spider:
Expand Down Expand Up @@ -35,4 +39,19 @@ jobs:
if: ${{ steps.commit-files.outputs.hasChange == 'true' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
branch: ${{ github.ref }}
trigger_deploy:
needs: spider
runs-on: ubuntu-latest
steps:
- name: Trigger tests
uses: actions/github-script@v6
with:
script: |
const res = await github.rest.repos.createDispatchEvent({
owner: 'jaywcjlove',
repo: 'typenexus',
event_type: 'run-deploy'
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 10426b6

Please sign in to comment.