-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.13 KB
/
ci-dev.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
name: CI (dev)
permissions:
contents: read
on:
push:
branches: ["dev"]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
lints:
name: "Lint"
uses: ./.github/workflows/act_lint.yml
permissions:
contents: read
security-events: write
build:
name: "Build"
uses: ./.github/workflows/act_build.yml
mdbook:
name: "Mdbook"
uses: ./.github/workflows/act_mdbook.yml
push-to-main:
needs: [lints, build, mdbook]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
# Shallow checkouts don't work for merging, so pull in enough history to likely work
fetch-depth: 75
# Needed to push to main
persist-credentials: false
- name: Update main
run: |
set -xe
git fetch origin main
git checkout main
git pull origin main
git merge --ff-only dev
- uses: ad-m/[email protected]
name: Push to main
with:
github_token: ${{ secrets.GH_PAT }}
branch: main