tei.su/.forgejo/workflows/publish.yaml
alina sireneva ad494b18ec
Some checks failed
Publish and deploy / publish (push) Failing after 13s
Publish and deploy / deploy (push) Has been skipped
chore: migrated to forgejo
2025-01-04 02:59:49 +03:00

62 lines
No EOL
1.5 KiB
YAML

name: Publish and deploy
on:
push:
branches: [ main ]
workflow_dispatch:
concurrency:
group: deploy
cancel-in-progress: true
jobs:
publish:
if: github.repository == 'teidesu/tei.su' # do not run on forks
runs-on: docker
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
env:
DONATE_PAGE_DATA: ${{ vars.DONATE_PAGE_DATA }}
run: |
echo "$DONATE_PAGE_DATA" > src/components/pages/PageDonate/data.json
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: git.stupid.fish
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: git.stupid.fish/teidesu/tei.su
tags: type=sha
flavor: latest=true
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
runs-on: node22
needs: publish
steps:
- uses: teidesu/desu-deploy@main
with:
key: ${{ secrets.DEPLOY_KEY }}
server: ${{ secrets.DEPLOY_SERVER }}
wireguard: ${{ secrets.DEPLOY_WG }}
service: teisu