add forgejo actions workflow for deploying the static website
Some checks failed
/ build (push) Failing after 10s
Some checks failed
/ build (push) Failing after 10s
This commit is contained in:
parent
916ec2ed35
commit
7b17374a5b
1 changed files with 43 additions and 0 deletions
43
.forgejo/workflows/deploy.yaml
Normal file
43
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
TZ: Europe/Berlin
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: alpine:latest
|
||||
steps:
|
||||
- name: Pipeline info
|
||||
run: |
|
||||
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
apk update
|
||||
# For CI actions.
|
||||
apk add nodejs-current
|
||||
# For website build.
|
||||
apk add tzdata coreutils curl jq git
|
||||
# For uploading.
|
||||
apk add rsync openssh
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy - Prepare keys
|
||||
run: |
|
||||
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
|
||||
chmod 400 deploykey.priv
|
||||
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
|
||||
cat ./known_hosts
|
||||
|
||||
- name: Deploy - Upload to prod
|
||||
run: |
|
||||
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" cpu.ccc.de/ cpuccc-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/cpu.ccc.de/
|
||||
Loading…
Add table
Add a link
Reference in a new issue