This commit is contained in:
commit
fa2c7aa0d7
2 changed files with 59 additions and 0 deletions
54
.forgejo/workflows/deploy.yaml
Normal file
54
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
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:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
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
|
||||||
|
ln -s ../yanity.yaml ./vanity.yaml
|
||||||
|
go run main.go
|
||||||
|
- name: Install rclone
|
||||||
|
run: apt install rclone
|
||||||
|
- name: Configure rclone
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
|
||||||
|
run: |
|
||||||
|
mkdir ~/.ssh
|
||||||
|
cat < ~/.ssh/id_ed25519.pub <<< $SSH_PUBLIC_KEY
|
||||||
|
cat < ~/.ssh/id_ed25519 <<< $SSH_PRIVATE_KEY
|
||||||
|
mkdir ~/.config/rclone
|
||||||
|
cat < ~/.config/rclone/config.conf <<<-EOF
|
||||||
|
[bridget]
|
||||||
|
type = sftp
|
||||||
|
host = bridget
|
||||||
|
user = www-data
|
||||||
|
EOF
|
||||||
|
- name: Upload HTML
|
||||||
|
run: |
|
||||||
|
rclone sync --delete-during -vv ./go-vanity/public bridget:/var/www/vanity
|
||||||
5
vanity.yaml
Normal file
5
vanity.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
host: go.bliss.town
|
||||||
|
|
||||||
|
paths:
|
||||||
|
/clock:
|
||||||
|
repo: https://forge.bliss.town/blisstown/clock
|
||||||
Loading…
Add table
Add a link
Reference in a new issue