AT-based link agregator. Mirror of https://github.com/likeandscribe/frontpage
1name: sync-tangled
2permissions:
3 contents: read
4
5on:
6 push:
7 branches:
8 - main
9
10jobs:
11 sync:
12 runs-on: ubuntu-latest
13 environment: tangled-sync
14 steps:
15 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
16 with:
17 fetch-depth: 0
18 ref: ${{ github.event.pull_request.head.sha }}
19 - name: sync tangled
20 env:
21 TANGLED_SSH_PRIVATE_KEY: ${{ secrets.TANGLED_SSH_PRIVATE_KEY }}
22 run: |
23 set -euo pipefail
24 # Turn off strict SSH key checking
25 mkdir -p ~/.ssh
26 echo "Host *
27 StrictHostKeyChecking no
28 UserKnownHostsFile=/dev/null" > ~/.ssh/config
29
30 # Write SSH key to disk
31 echo "$TANGLED_SSH_PRIVATE_KEY" > ~/.ssh/tangled_key
32 chmod 600 ~/.ssh/tangled_key
33
34 # Configure SSH to use the key for tangled.sh
35 echo "Host tangled.sh
36 IdentityFile ~/.ssh/tangled_key" >> ~/.ssh/config
37
38 chmod 600 ~/.ssh/config
39
40 # Set git user
41 git config --global user.name "Frontpage Bot"
42 git config --global user.email "team@frontpage.fyi"
43
44 git remote add tangled git@tangled.sh:frontpage.fyi/frontpage
45 git push -f --all tangled
46 git push -f --tags tangled