vanity/.forgejo/workflows/deploy.yaml

52 lines
1.3 KiB
YAML
Raw Normal View History

2026-08-17 18:39:10 -04:00
name: Deploy
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
2026-08-17 18:40:47 -04:00
runs-on: docker
2026-08-17 18:39:10 -04:00
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "stable"
- name: Clone open-feature/go-vanityurls
run: git clone https://github.com/open-feature/go-vanityurls
- name: Generate HTML
run: |
cd go-vanityurls
2026-08-17 18:40:47 -04:00
ln -sf ../vanity.yaml ./vanity.yaml
2026-08-17 18:39:10 -04:00
go run main.go
2026-08-17 18:40:47 -04:00
- name: Upload HTML
2026-08-17 18:39:10 -04:00
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
2026-08-17 18:40:47 -04:00
apt update && apt install -y rclone
install -d -m 700 ~/.ssh
printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
rclone sync \
--delete-during \
-vv \
--sftp-host bridget.arimelody.space \
--sftp-port 40195 \
--sftp-user vanity \
--sftp-key-file ~/.ssh/deploy_key \
--sftp-shell-type none \
./go-vanityurls/public :sftp:/var/www/vanity