main website/.gitea/workflows/deploy.yml

28 lines736 B

name: deploy
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
container: php:7.4-cli
steps:
- uses: actions/checkout@v4
- run: curl -sS https://getcomposer.org/installer | php && php composer.phar install -q
- run: vendor/bin/phpunit
deploy:
needs: test
runs-on: ubuntu-latest
env:
GITEA_URL: https://git.glibcode.net
GITEA_TOKEN: aaad3b8d9de81995855d98e48d216d7b93c9d8fa
steps:
- name: Fetch the deploy scripts
run: |
git clone https://deploy-bot:${GITEA_TOKEN}@git.glibcode.net/glibcode-ops/deploy.git ops
- name: Deploy
run: ops/deploy.sh production
env:
SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}