Skip to content

Commit 16d58be

Browse files
authored
docs: Add Schedule and Manual Deployment (#386)
[Events that trigger workflows - GitHub Docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows) - on.schedule - on.workflow_dispatch
1 parent a8941b8 commit 16d58be

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ All Actions runners: Linux (Ubuntu), macOS, and Windows are supported.
8282
- [⭐️ Create SSH Deploy Key](#%EF%B8%8F-create-ssh-deploy-key)
8383
- [⭐️ First Deployment with `GITHUB_TOKEN`](#%EF%B8%8F-first-deployment-with-github_token)
8484
- [⭐️ Use the latest and specific release](#%EF%B8%8F-use-the-latest-and-specific-release)
85+
- [⭐️ Schedule and Manual Deployment](#%EF%B8%8F-schedule-and-manual-deployment)
8586
- [Examples](#examples)
8687
- [⭐️ Static Site Generators with Node.js](#%EF%B8%8F-static-site-generators-with-nodejs)
8788
- [⭐️ Gatsby](#%EF%B8%8F-gatsby)
@@ -348,7 +349,7 @@ When you use `deploy_key`, set your private key to the repository which includes
348349

349350
**Note that `GITHUB_TOKEN` has no permission to access to external repositories. Please create a personal access token and set it to `personal_token` like `personal_token: ${{ secrets.PERSONAL_TOKEN }}`.**
350351

351-
Use case:
352+
Use case:
352353

353354
A GitHub Free Plan account cannot use the GitHub Pages in a private repository. To make your source contents private and deploy it with the GitHub Pages, you can deploy your site from a private repository to a public repository using this option.
354355

@@ -536,6 +537,32 @@ updates:
536537

537538
See the official documentation for more details about the Dependabot: [Keeping your dependencies updated automatically - GitHub Docs](https://docs.github.com/en/github/administering-a-repository/keeping-your-dependencies-updated-automatically)
538539

540+
### ⭐️ Schedule and Manual Deployment
541+
542+
For deploying regularly, we can set the `on.schedule` workflow trigger.
543+
See [Scheduled events | Events that trigger workflows - GitHub Docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events)
544+
545+
For deploying manually, we can set the `on.workflow_dispatch` workflow trigger.
546+
See [Manual events `workflow_dispatch` | Events that trigger workflows - GitHub Docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events)
547+
548+
```yaml
549+
name: github pages
550+
551+
on:
552+
push:
553+
branches:
554+
- master
555+
schedule:
556+
- cron: "22 22 * * *"
557+
workflow_dispatch:
558+
559+
jobs:
560+
deploy:
561+
runs-on: ubuntu-18.04
562+
steps:
563+
...
564+
```
565+
539566
<div align="right">
540567
<a href="#table-of-contents">Back to TOC ☝️</a>
541568
</div>

0 commit comments

Comments
 (0)