-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.55 KB
/
publish.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
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push-to-lrz-gitlab:
needs: build-deploy
runs-on: ubuntu-latest
steps:
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add GitLab to known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan gitlab.lrz.de >> ~/.ssh/known_hosts
# You can also verify the fingerprint manually (optional)
# ssh-keyscan gitlab.lrz.de | tee -a ~/.ssh/known_hosts
- name: Check LRZ connection
run: |
ssh -T [email protected]
- name: Add LRZ GitLab remote
run: |
git remote add lrz_gitlab_remote [email protected]:lmu-open-science-center/lmu-osc-website.git
git remote -v
- name: Fetch and push all branches to new remote
run: |
# list branches
git fetch --all
git branch
# push them
git push lrz_gitlab_remote --all