Skip to content

Commit 59051a2

Browse files
author
NewSkyLine
committed
Added scheduled run
1 parent 528da93 commit 59051a2

2 files changed

Lines changed: 50 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
name: Deploy static content to Pages
33

44
on:
5+
workflow_run:
6+
workflows: scheduled
7+
58
push:
69
branches: [main]
7-
schedule:
8-
- cron: "0 */5 * * *"
910

1011
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
1112
permissions:

.github/workflows/scheduled.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: scheduled
2+
3+
on:
4+
schedule:
5+
- cron: "0 */5 * * *"
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
# Allow one concurrent deployment
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
# Single deploy job since we're just deploying
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Set up Node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: 18
31+
cache: "npm"
32+
- name: Install dependencies
33+
run: npm install
34+
- name: Build
35+
run: npm run dev
36+
# - name: Generate
37+
# run: npm run dev
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v3
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v2
42+
with:
43+
# Upload dist repository
44+
path: "./dist"
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)