46 lines
No EOL
1.3 KiB
YAML
46 lines
No EOL
1.3 KiB
YAML
name: Deploy Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
PAGE_SERVER: pgs.xlion.dev
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ha
|
|
container:
|
|
image: quay.io/fedora/fedora:latest
|
|
|
|
steps:
|
|
- name: Install deps
|
|
run: |
|
|
sudo dnf install -y gh tar nodejs
|
|
|
|
- name: Gh download
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
run: |
|
|
gh run download -R xlionjuan/rustdesk-apt-repo-nightly -n github-pages
|
|
mkdir public
|
|
tar -xvf *.tar -C public/
|
|
|
|
- name: Deploy production
|
|
if: ${{ forgejo.event_name != 'pull_request' }}
|
|
uses: https://codeberg.org/git-pages/action@v2
|
|
with:
|
|
site: https://${{ forgejo.event.repository.owner.username }}.${{ env.PAGE_SERVER }}/${{ forgejo.event.repository.name }}/
|
|
token: ${{ forgejo.token }}
|
|
source: public
|
|
|
|
- name: Deploy PR preview
|
|
if: ${{ forgejo.event_name == 'pull_request' }}
|
|
uses: https://codeberg.org/git-pages/action@v2
|
|
with:
|
|
site: https://${{ forgejo.event.repository.owner.username }}.preview.${{ env.PAGE_SERVER }}/${{ forgejo.event.repository.name }}@${{ forgejo.event.number }}/
|
|
token: ${{ forgejo.token }}
|
|
source: public |