Build, deploy & check Mirror #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, deploy & check Mirror | |
on: | |
workflow_dispatch: | |
inputs: | |
repo: | |
description: 'The composer repository url' | |
required: true | |
default: 'https://preview-mirror.mage-os.org/' | |
type: choice | |
options: | |
- https://preview-mirror.mage-os.org/ | |
- https://mirror.mage-os.org/ | |
remote_dir: | |
description: 'The deploy target directory on the repo host' | |
required: true | |
default: '/var/www/preview-mirror.mage-os.org/html/' | |
type: choice | |
options: | |
- /var/www/preview-mirror.mage-os.org/html/ | |
- /var/www/mirror.mage-os.org/html/ | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
uses: ./.github/workflows/deploy.yml | |
name: "generate & deploy" | |
if: contains('["vinai","mage-os-ci"]', github.actor) | |
with: | |
repo: ${{ inputs.repo }} | |
remote_dir: ${{ inputs.remote_dir }} | |
entrypoint: src/make/mirror.js | |
delete: true | |
secrets: | |
SERVER_SSH_KEY: ${{ secrets.SERVER_SSH_KEY }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
integrity-check: | |
needs: [deploy] | |
uses: ./.github/workflows/integrity-check.yml | |
with: | |
repo: ${{ inputs.repo }} | |
secrets: | |
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} |