-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (65 loc) · 2.09 KB
/
updateall.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
# https://crontab.guru/#0_10,22_*_*_*
schedule:
- cron: '0 8 * * *'
#- cron: '0 10,22 * * *'
workflow_dispatch:
inputs:
print_tags:
description: 'True to print to STDOUT'
required: false
type: boolean
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
updateall:
runs-on: ubuntu-latest
timeout-minutes: 45
#if: ${{ inputs.print_tags }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Update all refs
run: ./updateall.sh
- name: Add all to git
run: git add -A
- name: Git status
run: git status
- name: Commit & Push changes
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 # https://github.com/actions-js/push/releases/tag/v1.4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: updateall
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with:
branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}
message: 'chore: update existing repos ${date}'