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 }}
|
|
|
|
|
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
|
2026-08-17 18:40:47 -04:00
|
|
|
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
|
2026-08-17 18:39:10 -04:00
|
|
|
run: |
|
2026-08-17 18:40:47 -04:00
|
|
|
apt update && apt install rclone
|
2026-08-17 18:39:10 -04:00
|
|
|
mkdir ~/.ssh
|
2026-08-17 18:40:47 -04:00
|
|
|
cat > ~/.ssh/id_ed25519.pub <<< $SSH_PUBLIC_KEY
|
|
|
|
|
cat > ~/.ssh/id_ed25519 <<< $SSH_PRIVATE_KEY
|
2026-08-17 18:39:10 -04:00
|
|
|
mkdir ~/.config/rclone
|
2026-08-17 18:40:47 -04:00
|
|
|
cat > ~/.config/rclone/rclone.conf <<< $'[bridget]\ntype = sftp\nhost = bridget.arimelody.space\nport = 40195\nuser = vanity'
|
|
|
|
|
RCLONE_SFTP_PASS="$SSH_PASSWORD" rclone sync --delete-during -vv ./go-vanity/public bridget:/var/www/vanity
|