ci-test/.gitea/workflows/demo.yaml

37 lines
1.1 KiB
YAML
Raw Normal View History

2023-10-03 16:09:10 +02:00
name: Gitea Actions Demo
2023-10-03 16:29:52 +02:00
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
2023-10-03 16:09:10 +02:00
on: [push]
2023-10-03 16:29:52 +02:00
2023-10-03 16:09:10 +02:00
jobs:
2023-10-14 14:49:13 +02:00
checkout:
2023-10-03 18:46:26 +02:00
runs-on: ubuntu-latest
steps:
2023-10-14 14:46:22 +02:00
- name: check out repo
uses: actions/checkout@v3
2023-10-14 16:13:07 +02:00
- name: list files
2023-10-14 16:15:29 +02:00
run: |
2023-10-14 16:27:11 +02:00
echo "In outer docker container:"
2023-10-16 16:07:54 +02:00
ls /workspace/testorg/ci-test
2023-10-14 16:15:29 +02:00
pwd
2023-10-16 16:17:58 +02:00
ls /home
2023-10-16 19:11:28 +02:00
echo "Docker images: $(docker images)"
2023-10-14 16:27:11 +02:00
echo "end outer print"
2023-10-16 16:20:29 +02:00
2023-10-14 15:31:47 +02:00
- name: compile
2023-10-16 20:57:19 +02:00
run: |
2023-10-17 14:52:36 +02:00
pdflatex main.tex
2023-10-17 15:07:15 +02:00
- name: prepare pages
run: |
mkdir public
mv main.pdf main.log public
cd public
zip main.zip main.pdf main.log
tree -H '.' -I "index.html" -D --charset utf-8 -T "CI test" > index.html
2023-10-17 14:46:20 +02:00
- name: deploy
run: |
2023-10-17 14:51:38 +02:00
echo "${{ secrets.deploy_ssh_key }}" >> privkey
2023-10-17 14:46:20 +02:00
chmod 600 privkey
2023-10-17 14:59:58 +02:00
echo "abstractnonsen.se ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAufJTq206GOv0D8gHs2o3eDusLNWaB0U7JRhUYnux9B" >> ~/.ssh/known_hosts
2023-10-17 15:10:48 +02:00
tar -C public -czf - . | ssh -o "IdentitiesOnly=yes" -i privkey pages@abstractnonsen.se
2023-10-17 15:01:45 +02:00